File-BaseDir
view release on metacpan or search on metacpan
{
"abstract" : "Use the Freedesktop.org base directory specification",
"author" : [
"Jaap Karssenberg || Pardus [Larus] <pardus@cpan.org>",
"Graham Ollis <plicease@cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.022, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
---
abstract: 'Use the Freedesktop.org base directory specification'
author:
- 'Jaap Karssenberg || Pardus [Larus] <pardus@cpan.org>'
- 'Graham Ollis <plicease@cpan.org>'
build_requires:
File::Which: '0'
Test::More: '0.98'
perl: '5.006'
configure_requires:
ExtUtils::MakeMaker: '0'
perl: '5.006'
Makefile.PL view on Meta::CPAN
exit;
}
}
# This file was automatically generated by Dist::Zilla::Plugin::Author::Plicease::MakeMaker v2.66.
use strict;
use warnings;
use 5.006;
use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "Use the Freedesktop.org base directory specification",
"AUTHOR" => "Jaap Karssenberg || Pardus [Larus] <pardus\@cpan.org>, Graham Ollis <plicease\@cpan.org>",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "File-BaseDir",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.006",
"NAME" => "File::BaseDir",
"PM" => {
"lib/File/BaseDir.pm" => "\$(INST_LIB)/File/BaseDir.pm",
NAME
File::BaseDir - Use the Freedesktop.org base directory specification
VERSION
version 0.09
SYNOPSIS
use File::BaseDir qw/xdg_data_files/;
for ( xdg_data_files('mime/globs') ) {
# do something
}
DESCRIPTION
This module can be used to find directories and files as specified by
the Freedesktop.org Base Directory Specification. This specifications
gives a mechanism to locate directories for configuration, application
data and cache data. It is suggested that desktop applications for e.g.
the GNOME, KDE or Xfce platforms follow this layout. However, the same
layout can just as well be used for non-GUI applications.
This module forked from File::MimeInfo.
This module follows version 0.6 of BaseDir specification.
CONSTRUCTOR
new
---
pod_spelling_system:
skip: 0
# list of words that are spelled correctly
# (regardless of what spell check thinks)
stopwords:
- BaseDir
- Freedesktop
- Jaap
- KDE
- Karssenberg
- Larus
- Pardus
- XDG
- Xfce
- dirs
- xdg
lib/File/BaseDir.pm view on Meta::CPAN
package File::BaseDir;
use strict;
use warnings;
use Exporter 5.57 qw( import );
use File::Spec;
use Config;
# ABSTRACT: Use the Freedesktop.org base directory specification
our $VERSION = '0.09'; # VERSION
our %EXPORT_TAGS = (
vars => [ qw(
xdg_data_home xdg_data_dirs
xdg_config_home xdg_config_dirs
xdg_cache_home
) ],
lookup => [ qw(
data_home data_dirs data_files
lib/File/BaseDir.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
File::BaseDir - Use the Freedesktop.org base directory specification
=head1 VERSION
version 0.09
=head1 SYNOPSIS
use File::BaseDir qw/xdg_data_files/;
for ( xdg_data_files('mime/globs') ) {
# do something
}
=head1 DESCRIPTION
This module can be used to find directories and files as specified
by the Freedesktop.org Base Directory Specification. This specifications
gives a mechanism to locate directories for configuration, application data
and cache data. It is suggested that desktop applications for e.g. the
GNOME, KDE or Xfce platforms follow this layout. However, the same layout can
just as well be used for non-GUI applications.
This module forked from L<File::MimeInfo>.
This module follows version 0.6 of BaseDir specification.
=head1 CONSTRUCTOR
=head2 new
lib/File/IconTheme.pm view on Meta::CPAN
version 0.09
=head1 SYNOPSIS
use File::IconTheme qw(xdg_icon_theme_search_dirs);
print join "\n", xdg_icon_theme_search_dirs;
=head1 DESCRIPTION
This module can be used to find directories as specified
by the Freedesktop.org Icon Theme Specification. Currently only a tiny
(but most useful) part of the specification is implemented.
In case you want to B<store> an icon theme, use the directory returned by:
use File::BaseDir qw(data_dirs);
print scalar data_dirs('icons');
=head1 FUNCTIONS
Can be exported on request.
lib/File/IconTheme.pm view on Meta::CPAN
my @dirs = xdg_icon_theme_search_dir;
Returns a list of the base directories of icon themes.
=head1 CONFIGURATION AND ENVIRONMENT
C<$XDG_DATA_HOME>, C<$XDG_DATA_DIRS>
=head1 SEE ALSO
L<http://standards.freedesktop.org/icon-theme-spec/>
=head1 AUTHORS
=over 4
=item *
Jaap Karssenberg || Pardus [Larus] <pardus@cpan.org>
=item *
lib/File/UserDirs.pm view on Meta::CPAN
use strict;
use warnings;
use IPC::System::Simple qw(capturex);
use Exporter 5.57 qw( import );
# ABSTRACT: Find extra media and documents directories
our $VERSION = '0.09'; # VERSION
our %EXPORT_TAGS = (
all => [
qw(xdg_desktop_dir xdg_documents_dir xdg_download_dir xdg_music_dir
xdg_pictures_dir xdg_publicshare_dir xdg_templates_dir xdg_videos_dir)
]);
our @EXPORT_OK = @{$EXPORT_TAGS{all}};
sub _xdg_user_dir {
my ($purpose) = @_;
my $dir = capturex 'xdg-user-dir', $purpose;
chomp $dir;
return $dir;
}
sub xdg_desktop_dir {return _xdg_user_dir 'DESKTOP';}
sub xdg_documents_dir {return _xdg_user_dir 'DOCUMENTS';}
sub xdg_download_dir {return _xdg_user_dir 'DOWNLOAD';}
sub xdg_music_dir {return _xdg_user_dir 'MUSIC';}
sub xdg_pictures_dir {return _xdg_user_dir 'PICTURES';}
sub xdg_publicshare_dir {return _xdg_user_dir 'PUBLICSHARE';}
sub xdg_templates_dir {return _xdg_user_dir 'TEMPLATES';}
sub xdg_videos_dir {return _xdg_user_dir 'VIDEOS';}
1;
lib/File/UserDirs.pm view on Meta::CPAN
File::UserDirs - Find extra media and documents directories
=head1 VERSION
version 0.09
=head1 SYNOPSIS
use File::UserDirs qw(:all);
print xdg_desktop_dir; # e.g. /home/user/Desktop
=head1 DESCRIPTION
This module can be used to find directories as informally specified
by the Freedesktop.org xdg-user-dirs software. This
gives a mechanism to locate extra directories for media and documents files.
=head1 FUNCTIONS
May be exported on request.
Also the group C<:all> is defined which exports all methods.
=head2 xdg_desktop_dir
my $dir = xdg_desktop_dir;
Returns the desktop directory. Unless changed by the user,
this is the directory F<Desktop> in the home directory.
=head2 xdg_documents_dir
my $dir = xdg_documents_dir;
Returns the documents directory. Unless changed by the user,
this is the home directory.
=head2 xdg_download_dir
lib/File/UserDirs.pm view on Meta::CPAN
XDG_MUSIC_DIR="$HOME/Files/Audio"
XDG_PICTURES_DIR="$HOME/Files/Images"
XDG_PUBLICSHARE_DIR="$HOME/public_html"
XDG_TEMPLATES_DIR="$HOME/Files/Document templates"
XDG_VIDEOS_DIR="$HOME/Files/Video"
=head1 DEPENDENCIES
This module requires the executable F<xdg-user-dir> from the package
C<xdg-user-dirs>. Source code is available from
L<http://cgit.freedesktop.org/xdg/xdg-user-dirs/>.
=head1 AUTHORS
=over 4
=item *
Jaap Karssenberg || Pardus [Larus] <pardus@cpan.org>
=item *
t/03_userdirs.t view on Meta::CPAN
XDG_DOCUMENTS_DIR="$HOME/Files"
XDG_DOWNLOAD_DIR="$HOME/Files/Downloads"
XDG_MUSIC_DIR="$HOME/Files/Audio"
XDG_PICTURES_DIR="$HOME/Files/Images"
XDG_PUBLICSHARE_DIR="$HOME/public_html"
XDG_TEMPLATES_DIR="$HOME/Files/Document templates"
XDG_VIDEOS_DIR="$HOME/Files/Video"
UDD
close $fh;
is xdg_desktop_dir, catfile($ENV{HOME}, 'Workspace');
is xdg_documents_dir, catfile($ENV{HOME}, 'Files');
is xdg_download_dir, catfile($ENV{HOME}, 'Files/Downloads');
is xdg_music_dir, catfile($ENV{HOME}, 'Files/Audio');
is xdg_pictures_dir, catfile($ENV{HOME}, 'Files/Images');
is xdg_publicshare_dir, catfile($ENV{HOME}, 'public_html');
is xdg_templates_dir, catfile($ENV{HOME}, 'Files/Document templates');
is xdg_videos_dir, catfile($ENV{HOME}, 'Files/Video');
( run in 0.795 second using v1.01-cache-2.11-cpan-299005ec8e3 )