File-BaseDir
view release on metacpan or search on metacpan
Revision history for File-BaseDir
0.09 2021-07-08 14:04:14 -0600
- Tests can now be run in parallel or isolation safely (rt#199256)
- Fallback on getpwuid if environment variable not set (rt#127138)
- Test suite works with or without environment variables (rt#127138)
0.08 13 Mar 2018
Fix for failing test in 03_userdirs.t, thanks to Pierre Labastie
0.07 21 Apr 2015
Use temporary files for 03_userdirs.t test, fix for RT bug 103805
0.06 6 Apr 2015
Added prerequsite module build_requires section of Build.PL
lib/File/BaseDir.pm view on Meta::CPAN
);
if($^O eq 'MSWin32')
{
*_rootdir = sub { 'C:\\' };
*_home = sub { $ENV{USERPROFILE} || $ENV{HOMEDRIVE}.$ENV{HOMEPATH} || 'C:\\' };
}
else
{
*_rootdir = sub { File::Spec->rootdir };
*_home = sub { $ENV{HOME} || eval { [getpwuid($>)]->[7] } || File::Spec->rootdir };
}
# OO method
sub new { bless \$VERSION, shift } # what else is there to bless ?
# Variable methods
sub xdg_data_home { $ENV{XDG_DATA_HOME} || File::Spec->catdir(_home(), qw/.local share/) }
sub xdg_data_dirs {
( $ENV{XDG_DATA_DIRS}
( run in 0.428 second using v1.01-cache-2.11-cpan-8d75d55dd25 )