Help language development. Donate to The Perl Foundation

XDG::BaseDirectory cpan:JSTOWE last updated on 2019-03-04



Perl 6 access to path information provided by the xdg base directory specfication

Build Status


use XDG::BaseDirectory;

my $bd =

for $bd.load-config-paths('', 'MyProg', 'Options') -> $d {
    say $d;

# Directories can be made available as terms as well
use XDG::BaseDirectory :terms;

say config-home;


This is loosely based on the interface of python module pyxdg. But due to the differences between Python and Perl 6 it may do some things differently.

It provides a set of facilities for discovering the location of the configuration and data of applications.

I split this out from the XDG module as it has more general usefulness and no external dependencies.


Assuming you have a working Rakudo Perl 6 installation with zef installed you can install from a copy of the source directory:

 zef install .

or remotely:

 zef install XDG::BaseDirectory 


Suggestions/patches are welcomed via github at:

I'm not able to test on a wide variety of platforms so any help there would be appreciated.


This module is Free Software please see the LICENCE file in the distribution for the exact terms.

© Jonathan Stowe 2015, 2016, 2017, 2018, 2019