File-DesktopEntry-0.22/0000755000175000017500000000000012632401443014552 5ustar michielmichielFile-DesktopEntry-0.22/README.md0000644000175000017500000000203612625365441016043 0ustar michielmichiel# File-DesktopEntry You can use this module to work with `.desktop` files as specified by the Freedesktop.org specification. ## INSTALLATION If you are on Linux, the most convenient way to install this module is via your package manager. On Debian or Ubuntu: sudo apt-get install libfile-desktopentry-perl on Fedora, RHEL or CentOS: sudo yum install perl-File-DesktopEntry note: on RHEL or CentOS you'd need to first install [EPEL](https://fedoraproject.org/wiki/EPEL): sudo yum install epel-release If you can't install from a package manager, the best solution is installation using your cpan client. This will take care of installing any dependencies: cpan File::DesktopEntry To install this module manually, type the following: perl Makefile.PL make make test make install ## COPYRIGHT AND LICENCE Copyright (c) 2005, 2007 Jaap G Karssenberg. Maintained by Michiel Beijen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. File-DesktopEntry-0.22/lib/0000755000175000017500000000000012632401443015320 5ustar michielmichielFile-DesktopEntry-0.22/lib/File/0000755000175000017500000000000012632401443016177 5ustar michielmichielFile-DesktopEntry-0.22/lib/File/DesktopEntry.pm0000644000175000017500000005717012632400537021205 0ustar michielmichielpackage File::DesktopEntry; use strict; use warnings; use vars qw/$AUTOLOAD/; use Carp; use Encode; use File::Spec; use File::BaseDir 0.03 qw/data_files data_home/; use URI::Escape; our $VERSION = '0.22'; our $VERBOSE = 0; if ($^O eq 'MSWin32') { eval q/use Win32::Process/; die $@ if $@; } =head1 NAME File::DesktopEntry - Object to handle .desktop files =head1 SYNOPSIS use File::DesktopEntry; my $entry = File::DesktopEntry->new('firefox'); print "Using ".$entry->Name." to open http://perl.org\n"; $entry->run('http://perl.org'); =head1 DESCRIPTION This module is designed to work with F<.desktop> files. The format of these files is specified by the freedesktop "Desktop Entry" specification. This module can parse these files but also knows how to run the applications defined by these files. For this module version 1.0 of the specification was used. This module was written to support L. Please remember: case is significant for the names of Desktop Entry keys. =head1 VARIABLES You can set the global variable C<$File::DesktopEntry::VERBOSE>. If set the module prints a warning every time a command gets executed. The global variable C<$File::DesktopEntry::LOCALE> tells you what the default locale being used is. However, changing it will not change the default locale. =head1 AUTOLOAD All methods that start with a capital are autoloaded as C where key is the autoloaded method name. =head1 METHODS =over 4 =item C =item C =item C Constructor. FILE, NAME or TEXT are optional arguments. When a name is given (a string without 'C', 'C<\>' or 'C<.>') a lookup is done using File::BaseDir. If the file found in this lookup is not writable or if no file was found, the XDG_DATA_HOME path will be used when writing. =cut our $LOCALE = 'C'; # POSIX setlocale(LC_MESSAGES) not supported on all platforms # so we do it ourselves ... # string might look like lang_COUNTRY.ENCODING@MODIFIER for (qw/LC_ALL LC_MESSAGES LANGUAGE LANG/) { next unless $ENV{$_}; $LOCALE = $ENV{$_}; last; } our $_locale = _parse_lang($LOCALE); sub new { my ($class, $file) = @_; my $self = bless {}, $class; if (! defined $file) { # initialize new file $self->set(Version => '1.0', Encoding => 'UTF-8'); } elsif (ref $file) { $self->read($file) } # SCALAR elsif ($file =~ /[\/\\\.]/) { $$self{file} = $file } # file else { $$self{file} = $class->lookup($file); # name $$self{name} = $file; } return $self; } sub AUTOLOAD { $AUTOLOAD =~ s/.*:://; return if $AUTOLOAD eq 'DESTROY'; croak "No such method: File::DesktopEntry::$AUTOLOAD" unless $AUTOLOAD =~ /^[A-Z][A-Za-z0-9-]+$/; return $_[0]->get($AUTOLOAD); } =item C Returns a filename for a desktop entry with desktop file id NAME. =cut sub lookup { my (undef, $name) = @_; $name .= '.desktop'; my $file = data_files('applications', $name); if (! $file and $name =~ /-/) { # name contains "-" and was not found my @name = split /-/, $name; $file = data_files('applications', @name); } return $file; } sub _parse_lang { # lang might look like lang_COUNTRY.ENCODING@MODIFIER my $lang = shift; return '' if !$lang or $lang eq 'C' or $lang eq 'POSIX'; $lang =~ m{^ ([^_@\.]+) # lang $1 (?: _ ([^@\.]+) )? # COUNTRY $2 (?: \. [^@]+ )? # ENCODING (?: \@ (.+) )? # MODIFIER $3 $}x or return ''; my ($l, $c, $m) = ($1, $2, $3); my @locale = ( $l, ($m ? "$l\@$m" : ()), ($c ? "$l\_$c" : ()), (($m && $c) ? "$l\_$c\@$m" : ()) ); return join '|', reverse @locale; } =item C Returns true if the Exec string for this desktop entry specifies that the application uses URIs instead of paths. This can be used to determine whether an application uses a VFS library. =item C Returns true if the Exec string for this desktop entry specifies that the application can handle multiple arguments at once. =cut sub wants_uris { my $self = shift; my $exec = $self->get('Exec'); croak "No Exec string defined for desktop entry" unless length $exec; $exec =~ s/\%\%//g; return $exec =~ /\%U/i; } sub wants_list { my $self = shift; my $exec = $self->get('Exec'); croak "No Exec string defined for desktop entry" unless length $exec; $exec =~ s/\%\%//g; return $exec !~ /\%[fud]/; # we default to %F if no /\%[FUD]/i is found } =item C Forks and runs the application specified in this Desktop Entry with arguments FILES as a background process. Returns the pid. The child process fails when this is not a Desktop Entry of type Application or if the Exec key is missing or invalid. If the desktop entry specifies that the program needs to be executed in a terminal the $TERMINAL environment variable is used. If this variable is not set C is used as default. (On Windows this method returns a L object.) =item C Like C but using the C system call. It only return after the application has ended. =item C Like C but using the C system call. This method is expected not to return but to replace the current process with the application you try to run. On Windows this method doesn't always work the way you want it to due to the C emulation on this platform. Try using C or C instead. =cut sub run { my $pid = fork; return $pid if $pid; # parent process unshift @_, 'exec'; goto \&_run; } sub system { unshift @_, 'system'; goto \&_run } sub exec { unshift @_, 'exec'; goto \&_run } sub _run { my $call = shift; my $self = shift; croak "Desktop entry is not an Application" unless $self->get('Type') eq 'Application'; my @exec = $self->parse_Exec(@_); my $t = $self->get('Terminal'); if ($t and $t eq 'true') { my $term = $ENV{TERMINAL} || 'xterm -e'; unshift @exec, _split($term); } my $cwd; if (my $path = $self->get('Path')) { require Cwd; $cwd = Cwd::getcwd(); chdir $path or croak "Could not change to dir: $path"; $ENV{PWD} = $path; warn "Running from directory: $path\n" if $VERBOSE; } warn "Running: "._quote(@exec)."\n" if $VERBOSE; if ($call eq 'exec') { CORE::exec {$exec[0]} @exec; exit 1 } else { CORE::system {$exec[0]} @exec } warn "Error: $!\n" if $VERBOSE and $?; if (defined $cwd) { chdir $cwd or croak "Could not change back to dir: $cwd"; $ENV{PWD} = $cwd; } } =item C Expands the Exec format in this desktop entry with. Returns a properly quoted string in scalar context or a list of words in list context. Dies when the Exec key is invalid. It supports the following fields: %f single file %F multiple files %u single url %U multiple urls %i Icon field prefixed by --icon %c Name field, possibly translated %k location of this .desktop file %% literal '%' If necessary this method tries to convert between paths and URLs but this is not perfect. Fields that are deprecated, but (still) supported by this module: %d single directory %D multiple directories The fields C<%n>, C<%N>, C<%v> and C<%m> are deprecated and will cause a warning if C<$VERBOSE> is used. Any other unknown fields will cause an error. The fields C<%F>, C<%U>, C<%D> and C<%i> can only occur as separate words because they expand to multiple arguments. Also see L. =cut sub parse_Exec { my ($self, @argv) = @_; my @format = _split( $self->get('Exec') ); # Check format my $seen = 0; for (@format) { my $s = $_; # copy; $s =~ s/\%\%//g; $seen += ($s =~ /\%[fFuUdD]/); die "Exec key for '".$self->get('Name')."' contains " . "'\%F\', '\%U' or '\%D' at the wrong place\n" if $s !~ /^\%[FUD]$/ and $s =~ /\%[FUD]/; die "Exec key for '".$self->get('Name')."' contains " . "unknown field code '$1'\n" if $s =~ /(\%[^fFuUdDnNickvm])/; croak "Application '".$self->get('Name')."' ". "takes only one argument" if @argv > 1 and $s =~ /\%[fud]/; warn "Exec key for '".$self->get('Name')."' contains " . "deprecated field codes\n" if $VERBOSE and $s =~ /%([nNvm])/; } if ($seen == 0) { push @format, '%F' } elsif ($seen > 1) { # not allowed according to the spec warn "Exec key for '".$self->get('Name')."' contains " . "multiple fields for files or uris.\n" } # Expand format my @exec; for (@format) { if (/^\%([FUD])$/) { push @exec, ($1 eq 'F') ? _paths(@argv) : ($1 eq 'U') ? _uris(@argv) : _dirs(@argv) ; } elsif ($_ eq '%i') { my $icon = $self->get('Icon'); push @exec, '--icon', $icon if defined($icon); } else { # expand with word ( e.g. --input=%f ) my $bad; s/\%(.)/ ($1 eq '%') ? '%' : ($1 eq 'f') ? (_paths(@argv))[0] : ($1 eq 'u') ? (_uris(@argv) )[0] : ($1 eq 'd') ? (_dirs(@argv) )[0] : ($1 eq 'c') ? $self->get('Name') : ($1 eq 'k') ? $$self{file} : '' ; /eg; push @exec, $_; } } if (wantarray and $^O eq 'MSWin32') { # Win32 requires different quoting *sigh* for (grep /"/, @exec) { s#"#\\"#g; $_ = qq#"$_"#; } } return wantarray ? (@exec) : _quote(@exec); } sub _split { # Reverse quoting and break string in words. # It allows single quotes to be used, which the spec doesn't. my $string = shift; my @args; while ($string =~ /\S/) { if ($string =~ /^(['"])/) { my $q = $1; $string =~ s/^($q(\\.|[^$q])*$q)//s; push @args, $1 if defined $1; } $string =~ s/(\S*)\s*//; # also fallback for above regex push @args, $1 if defined $1; } @args = grep length($_), @args; for (@args) { if (/^(["'])(.*)\1$/s) { $_ = $2; s/\\(["`\$\\])/$1/g; # remove backslashes } } return @args; } sub _quote { # Turn a list of words in a properly quoted Exec key my @words = @_; # copy; return join ' ', map { if (/([\s"'`\\<>~\|\&;\$\*\?#\(\)])/) { # reserved chars s/(["`\$\\])/\\$1/g; # add backslashes $_ = qq/"$_"/; # add quotes } $_; } grep defined($_), @words; } sub _paths { # Check if we need to convert file:// uris to paths # support file:/path file://localhost/path and file:///path # A path like file://host/path is replace by smb://host/path # which the app probably can't open map { $_ = _uri_to_path($_) if s#^file:(?://localhost/+|/|///+)(?!/)#/#i; s#^file://(?!/)#smb://#i; $_; } @_; } sub _dirs { # Like _paths, but makes the path a directory map { if (-d $_) { $_ } else { my ($vol, $dirs, undef) = File::Spec->splitpath($_); File::Spec->catpath($vol, $dirs, ''); } } _paths(@_); } sub _uris { # Convert paths to file:// uris map { m#^\w+://# ? $_ : 'file://'._path_to_uri($_); } @_; } sub _uri_to_path { my $x = Encode::encode('utf8', $_); $x = uri_unescape($x); return Encode::decode('utf8', $x); } sub _path_to_uri { my $path = File::Spec->rel2abs(shift); my ($volume, $directories, $file) = File::Spec->splitpath($path); my $uri = ''; # actually, on Windows, File URIs look like this: # file:///C:/Program%20Files/MyApp/app.exe # ref: https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/ if ($volume) { $uri .= '/' . $volume; } $uri .= join '/', map { uri_escape_utf8($_) } File::Spec->splitdir($directories . $file); return $uri; } =item C =item C Get a value for KEY from GROUP. If GROUP is not specified 'Desktop Entry' is used. All values are treated as string, so e.g. booleans will be returned as the literal strings "true" and "false". When KEY does not contain a language code you get the translation in the current locale if available or a sensible default. The request a specific language you can add the language part. E.g. C<< $entry->get('Name[nl_NL]') >> can return either the value of the 'Name[nl_NL]', the 'Name[nl]' or the 'Name' key in the Desktop Entry file. Exact language parsing order can be found in the spec. To force you get the untranslated key use either 'Name[C]' or 'Name[POSIX]'. =cut # used for (un-)escaping strings my %Chr = (s => ' ', n => "\n", r => "\r", t => "\t", '\\' => '\\'); my %Esc = reverse %Chr; sub get { my ($self, $group, $key) = (@_ == 2) ? ($_[0], '', $_[1]) : (@_) ; my $locale = $_locale; if ($key =~ /^(.*?)\[(.*?)\]$/) { $key = $1; $locale = _parse_lang($2); } my @lang = split /\|/, $locale; # Get values that match locale from group $self->read() unless $$self{groups}; my $i = $self->_group($group); return undef unless defined $i; my $lang = join('|', map quotemeta($_), @lang) || 'C'; my %matches = ( $$self{groups}[$i] =~ /^(\Q$key\E\[(?:$lang)\]|\Q$key\E)[^\S\n]*=[^\S\n]*(.*?)\s*$/gm ); return undef unless keys %matches; # Find preferred value my @keys = (map($key."[$_]", @lang), $key); my ($value) = grep defined($_), @matches{@keys}; # Parse string (replace \n, \t, etc.) $value =~ s/\\(.)/$Chr{$1}||$1/eg; return $value; } sub _group { # returns index for a group name my ($self, $group, $dont_die) = @_; $group ||= 'Desktop Entry'; croak "Group name contains invalid characters: $group" if $group =~ /[\[\]\r\n]/; for my $i (0 .. $#{$$self{groups}}) { return $i if $$self{groups}[$i] =~ /^\[\Q$group\E\]/; } return undef; } =item C VALUE, ...)> =item C VALUE, ...)> Set values for one or more keys. If GROUP is not given "Desktop Entry" is used. All values are treated as strings, backslashes, newlines and tabs are escaped. To set a boolean key you need to use the literal strings "true" and "false". Unlike the C call languages are not handled automatically for C. KEY should include the language part if you want to set a translation. E.g. C<< $entry->set("Name[nl_NL]" => "Tekst Verwerker") >> will set a Dutch translation for the Name key. Using either "Name[C]" or "Name[POSIX]" will be equivalent with not giving a language argument. When setting the Exec key without specifying a group it will be parsed and quoted correctly as required by the spec. You can use quoted arguments to include whitespace in a argument, escaping whitespace does not work. To circumvent this quoting explicitly give the group name 'Desktop Entry'. =cut sub set { my $self = shift; my ($group, @data) = ($#_ % 2) ? (undef, @_) : (@_) ; $self->read() unless $$self{groups} or ! $$self{file}; my $i = $self->_group($group); unless (defined $i) { $group ||= 'Desktop Entry'; push @{$$self{groups}}, "[$group]\n"; $i = $#{$$self{groups}}; } while (@data) { my ($k, $v) = splice(@data, 0, 2); $k =~ s/\[(C|POSIX)\]$//; # remove default locale my ($word) = ($k =~ /^(.*?)(\[.*?\])?$/); # separate key and locale croak "BUG: Key missing: $k" unless length $word; carp "Key contains invalid characters: $k" if $word =~ /[^A-Za-z0-9-]/; $v = _quote( _split($v) ) if ! $group and $k eq 'Exec'; # Exec key needs extra quoting $v =~ s/([\\\n\r\t])/\\$Esc{$1}/g; # add escapes $$self{groups}[$i] =~ s/^\Q$k\E=.*$/$k=$v/m and next; $$self{groups}[$i] .= "$k=$v\n"; } } =item C Returns the (modified) text of the file. =cut sub text { $_[0]->read() unless $_[0]{groups}; return '' unless $_[0]{groups}; s/\n?$/\n/ for @{$_[0]{groups}}; # just to be sure return join "\n", @{$_[0]{groups}}; } =item C =item C Read Desktop Entry data from file or memory buffer. Without argument defaults to file given at constructor. If you gave a file, text buffer or name to the constructor this method will be called automatically. =item C Read Desktop Entry data from filehandle or IO object. =cut sub read { my ($self, $file) = @_; $file ||= $$self{file}; croak "DesktopEntry has no filename to read from" unless length $file; my $fh; unless (ref $file) { open $fh, "<$file" or croak "Could not open file: $file"; } else { open $fh, '<', $file or croak "Could not open SCALAR ref !?"; } binmode $fh, ':utf8'; $self->read_fh($fh); close $fh; } sub read_fh { my ($self, $fh) = @_; $$self{groups} = []; # Read groups my $group = ''; while (my $l = <$fh>) { $l =~ s/\r?\n$/\n/; # DOS to Unix conversion if ($l =~ /^\[(.*?)\]\s*$/) { push @{$$self{groups}}, $group if length $group; $group = ''; } $group .= $l; } push @{$$self{groups}}, $group; s/\n\n$/\n/ for @{$$self{groups}}; # remove last empty line # Some checks for (qw/Name Type/) { carp "Required key missing in Desktop Entry: $_" unless defined $self->get($_); } my $enc = $self->get('Encoding'); carp "Desktop Entry uses unsupported encoding: $enc" if $enc and $enc ne 'UTF-8'; } =item C Write the Desktop Entry data to FILE. Without arguments it writes to the filename given to the constructor if any. The keys Name and Type are required. Type can be either C, C or C. For an application set the optional key C. For a link set the C key. =cut # Officially we should check lines end with LF - this is \n on Unix # but on Windows \n is CR LF, which breaks the spec sub write { my $self = shift; my $file = shift || $$self{file}; unless ($$self{groups}) { if ($$self{file}) { $self->read() } else { croak "Can not write empty Desktop Entry file" } } # Check keys for (qw/Name Type/) { croak "Can not write a desktop file without a $_ field" unless defined $self->get($_); } $self->set(Version => '1.0', Encoding => 'UTF-8'); # Check file writable $file = $self->_data_home_file if (! $file or ! -w $file) and defined $$self{name}; croak "No file given for writing Desktop Entry" unless length $file; # Write file s/\n?$/\n/ for @{$$self{groups}}; # just to be sure open OUT, ">$file" or die "Could not write file: $file\n"; binmode OUT, ':utf8' unless $] < 5.008; print OUT join "\n", @{$$self{groups}}; close OUT; } sub _data_home_file { # create new file name in XDG_DATA_HOME from name my $self = shift; my @parts = split /-/, $$self{name}; $parts[-1] .= '.desktop'; my $dir = data_home('applications', @parts[0 .. $#parts-1]); unless (-d $dir) { # create dir if it doesn't exist require File::Path; File::Path::mkpath($dir); } return data_home('applications', @parts); } =back =head2 Backwards Compatibility Methods supported for backwards compatibility with 0.02. =over 4 =item C Alias for C. =item C Alias for C. =item C Identical to C. LANG defaults to 'C', GROUP is optional. =cut sub new_from_file { $_[0]->new($_[1]) } sub new_from_data { $_[0]->new(\$_[1]) } sub get_value { my ($self, $key, $group, $locale) = @_; $locale ||= 'C'; $key .= "[$locale]"; $group ? $self->get($group, $key) : $self->get($key); } =back =head1 NON-UNIX PLATFORMS This module has a few bits of code to make it work on Windows. It handles C uri a bit different and it uses L. On other platforms your mileage may vary. Please note that the specification is targeting Unix platforms only and will only have limited relevance on other platforms. Any platform-dependent behavior in this module should be considered an extension of the spec. =cut if ($^O eq 'MSWin32') { # Re-define some modules - I assume this block gets optimized away by the # interpreter when not running on windows. no warnings; # Wrap _paths() to remove first '/' # As a special case translate SMB file:// uris my $_paths = \&_paths; *_paths = sub { my @paths = map { s#^file:////(?!/)#smb://#; $_; } @_; map { s#^/+([a-z]:/)#$1#i; $_; } &$_paths(@paths); }; # Wrap _uris() to remove '\' in path my $_uris = \&_uris; *_uris = sub { map { s#\\#/#g; $_; } &$_uris(@_); }; # Using Win32::Process because fork is not native on win32 # Effect is that closing an application spawned with fork # can kill the parent process as well when using Gtk2 *run = sub { my ($self, @files) = @_; my $cmd = eval { $self->parse_Exec(@files) }; warn $@ if $@; # run should not die my $bin = (_split($cmd))[0]; unless (-f $bin) { # we need the real binary path my ($b) = grep {-f $_} map File::Spec->catfile($_, $bin), split /[:;]/, $ENV{PATH} ; if (-f $b) { $bin = $b } else { warn "Could not find application: $bin\n"; return; } } my $dir = $self->get('Path') || '.'; if ($VERBOSE) { warn "Running from directory: $dir" unless $dir eq '.'; warn "Running: $cmd\n"; } my $obj; eval { Win32::Process::Create( $obj, $bin, $cmd, 0, &NORMAL_PRIORITY_CLASS, $dir ); }; warn $@ if $@; return $obj; }; } 1; __END__ =head1 LIMITATIONS If you try to exec a remote file with an application that can only handle files on the local file system we should -according to the spec- download the file to a temp location. This is not supported. Use the C method to check if an application supports urls. The values of the various Desktop Entry keys are not parsed (except for the Exec key). This means that booleans will be returned as the strings "true" and "false" and lists will still be ";" separated. If the icon is given as name and not as path it should be resolved for the C<%i> code in the Exec key. We need a separate module for the icon spec to deal with this. According to the spec comments can contain any encoding. However since this module read files as utf8, invalid UTF-8 characters in a comment will cause an error. There is no support for Legacy-Mixed Encoding. Everybody is using utf8 now ... right ? =head1 AUTHOR Jaap Karssenberg (Pardus) Epardus@cpan.orgE Maintained by Michiel Beijen Emichielb@cpan.orgE Copyright (c) 2005, 2007 Jaap G Karssenberg. All rights reserved. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO L L and L L =cut File-DesktopEntry-0.22/t/0000755000175000017500000000000012632401443015015 5ustar michielmichielFile-DesktopEntry-0.22/t/applications/0000755000175000017500000000000012632401443017503 5ustar michielmichielFile-DesktopEntry-0.22/t/applications/foo.desktop0000644000175000017500000000104712624422026021664 0ustar michielmichiel[Desktop Entry] Version=1.0 Type=Application Encoding=UTF-8 Name=Foo Viewer Comment=The best viewer for Foo objects available! Comment[eo]=Tekstredaktilo Comment[ja]=テキストエディタ TryExec=fooview Exec=fooview %F Icon=fooview.png MimeType=image/x-foo X-KDE-Library=libfooview X-KDE-FactoryName=fooviewfactory X-KDE-ServiceType=FooService [Desktop Action Inverse] # Inverse Foo => ooF Exec=fooview --inverse %f Name=Foo Viewer (inverse image) [Desktop Action Edit] Exec=fooview --edit %f Name=Foo Viewer (edit image) Icon=fooview-edit.png File-DesktopEntry-0.22/t/applications/rt65394.desktop0000644000175000017500000002012112624422026022133 0ustar michielmichiel[Desktop Entry] Categories=Qt;KDE;System;FileTools;FileManager;X-MandrivaLinux-System-FileTools; Comment[en_US]= Comment= Exec=caja GenericName[en_US]=File Manager GenericName=File Manager GenericName[af]=Lテェerbestuurder GenericName[ar]=ル・ッル韓ア ル・・・ァリェ GenericName[as]=爬ィ爬・爬ソ爬ェ爬、爰財ァー爰ー 爬ェ爰ー爬ソ爬壟ヲセ爬イ爬・ GenericName[ast]=Xestor de ficheros GenericName[be@latin]=Kiraナュnik fajナBナュ GenericName[be]=ミ墫毛€ミーム榧スム孟コ ム・ーミケミサミーム・ GenericName[bg]=ミ、ミーミケミサミセミイ ミシミオミスミクミエミカム貫€ GenericName[bn]=爬ォ爬セ爬・ヲイ 爬ョ爰財ヲッ爬セ爬ィ爰・ヲ憫ヲセ爬ー GenericName[bn_IN]=爬ォ爬セ爬・ヲイ 爬ェ爬ー爬ソ爬壟ヲセ爬イ爬ィ 爬ャ爰財ヲッ爬ャ爬ク爰財ヲ・爬セ GenericName[bs]=Menadナセer datoteka GenericName[ca@valencia]=Gestor de fitxers GenericName[ca]=Gestor de fitxers GenericName[cs]=Sprテ。vce souborナッ GenericName[csb]=Menadナシera lopkテウw GenericName[da]=Filhテ・ndtering GenericName[de]=Dateimanager GenericName[el]=ホ釆ケホアマ・オホケマ∃ケマρ・ョマ・ホアマ・・オホッマ火ス GenericName[en_GB]=File Manager GenericName[eo]=Dosieradministrilo GenericName[es]=Gestor de archivos GenericName[et]=Failihaldur GenericName[eu]=Fitxategi-kudeatzailea GenericName[fa]=ル・ッロ鈷ア ルセリアル異・ッル・ GenericName[fi]=Tiedostonhallinta GenericName[fr]=Gestionnaire de fichiers GenericName[fy]=Triembehearder GenericName[ga]=Bainisteoir Comhad GenericName[gl]=Xestor de ficheiros GenericName[gu]=爼ォ爼セ爼・ェイ 爼オ爿財ェッ爼オ爼ク爿財ェ・爼セ爼ェ爼・ GenericName[he]=ラ槞ラ蕃・ラァラ泰ヲラ燮・ GenericName[hi]=爨ォ爨シ爨セ爨・、イ 爨ェ爭財、ー爨ャ爨も、ァ爨・ GenericName[hne]=爨ォ爨セ爨・、イ 爨ェ爭財、ー爨ャ爨も、ァ爨・ GenericName[hr]=Upravitelj datoteka GenericName[hsb]=Datajowy manager GenericName[hu]=Fテ。jlkezelナ・ GenericName[ia]=Gerente de file GenericName[id]=Manajer Berkas GenericName[is]=Skrテ。astjテウri GenericName[it]=Gestore dei file GenericName[ja]=繝輔ぃ繧、繝ォ繝槭ロ繝シ繧ク繝」 GenericName[ka]=痺、痺雪・痺壯ヴ痺黛・痺。 痺帋・痺雪Β痺例ヵ痺批・痺・ GenericName[kk]=ミ、ミーミケミサ ミシミオミスミオミエミカミオム€ム・ GenericName[km]=癰€癰倔汳癰倔棡癰キ癰低楮窶吟桙癲低椢癰批沂癰ゃ汳癰壯桷窶吟椡癰€癰溂楔癰・ GenericName[kn]=犂歩イ。犂、 犂オ犁財イッ犂オ犂ク犁財イ・犂セ犂ェ犂・ GenericName[ko]=甯護攵 ・€・ャ・・ GenericName[ku]=Rテェveberテェ Pelan GenericName[lt]=Failナウ tvarkyklト・ GenericName[lv]=Failu pト〉valdnieks GenericName[mai]=爨ォ爨セ爨・、イ 爨ェ爭財、ー爨ャ爨も、ァ爨・ GenericName[mk]=ミ慴オミスミーム渙オム€ ミスミー ミエミームひセムひオミコミク GenericName[ml]=犇ォ犇ッ犇イ犒坂€・犇ィ犇游エ、犒財エ、犇ソ犇ェ犒財エェ犒≒エ歩エセ犇ー犇ィ犒坂€・ GenericName[mr]=爨ォ爨セ爨謂、イ 爨オ爭財、ッ爨オ爨ク爭財、・爨セ爨ェ爨・ GenericName[ms]=Pengurus Fail GenericName[nb]=Filbehandler GenericName[nds]=Dateipleger GenericName[ne]=爨ォ爨セ爨・、イ 爨ェ爭財、ー爨ャ爨ィ爭財、ァ爨・ GenericName[nl]=Bestandsbeheerder GenericName[nn]=Filhandsamar GenericName[oc]=Gestionari de fichiティrs GenericName[or]=牀ォ牀セ牀・ャイ 牀ェ牀ー牀ソ牀壟ャセ牀ウ牀・ GenericName[pa]=爲ォ爲セ爲・ィイ 爲ョ爻謂ィィ爻・ィ憫ィー GenericName[pl]=Zarzト・zanie plikami GenericName[pt]=Gestor de Ficheiros GenericName[pt_BR]=Gerenciador de arquivos GenericName[ro]=Gestionar de fiネ冓ere GenericName[ru]=ミ頒クム・ソミオムび・オム€ ム・ーミケミサミセミイ GenericName[se]=Fiilagieト疎halli GenericName[si]=犖憫キ憫カア犢・犖壟キ・カク犖ア犢鐘カ壟カサ犢・ GenericName[sk]=Sprテ。vca sテコborov GenericName[sl]=Upravljalnik datotek GenericName[sr@ijekavian]=ミ慴オミスミーム渙オム€ ム・ーム侑サミセミイミー GenericName[sr@ijekavianlatin]=Menadナセer fajlova GenericName[sr@latin]=Menadナセer fajlova GenericName[sr]=ミ慴オミスミーム渙オム€ ム・ーム侑サミセミイミー GenericName[sv]=Filhanterare GenericName[ta]=牋歩ッ金ョェ牘財ョェ牘・牋ョ牘・ョイ牋セ牋ウ牋ー牘・ GenericName[te]=牴ヲ牴ク牾財ー、牾財ーー牴セ牴イ 牴・ーュ牴ソ牴歩ーー牾財ー、 GenericName[tg]=ミ慯σエミクム€ミク ム・ーミケミサメウミセ GenericName[th]=犹€犧・ク」犧キ犹謂クュ犧・ク。犧キ犧ュ犧謂クア犧扉ク≒クイ犧」犹≒ク游ケ霞ク。 GenericName[tr]=Dosya Yテカnetici GenericName[ug]=レセロ・ャリャロ娩ェ リィリァリエルぽ・アリコロ・ GenericName[uk]=ミ慴オミスミオミエミカミオム€ ム・ーミケミサム孟イ GenericName[uz@cyrillic]=ミ、ミーミケミサ ミアミセム惟嶢ーム€ムσイム・クム・ク GenericName[uz]=Fayl boshqaruvchisi GenericName[vi]=B盻・qu蘯」n lテス t蘯ュp tin GenericName[wa]=Manaedjeu di fitchテョs GenericName[x-test]=xxFile Managerxx GenericName[zh_CN]=譁・サカ邂。逅・勣 GenericName[zh_TW]=讙疲。育ョ。逅・藤 Icon=system-file-manager InitialPreference=10 MimeType=inode/directory; Name[en_US]=caja Name=caja Name[af]=Dolphin Name[ar]=リッル異・・館・ Name[as]=Dolphin Name[ast]=Dolphin Name[be@latin]=Dolphin Name[be]=Dolphin Name[bg]=Dolphin Name[bn]=爬。爬イ爬ォ爬ソ爬ィ Name[bn_IN]=Dolphin Name[bs]=Delfin Name[ca@valencia]=Dolphin Name[ca]=Dolphin Name[cs]=Dolphin Name[csb]=Dolphin Name[da]=Dolphin Name[de]=Dolphin Name[el]=Dolphin Name[en_GB]=Dolphin Name[eo]=Dolphin Name[es]=Dolphin Name[et]=Dolphin Name[eu]=Dolphin Name[fi]=Dolphin Name[fr]=Dolphin Name[fy]=Dolfyn Name[ga]=Dolphin Name[gl]=Dolphin Name[gu]=爼。爿金ェイ爿財ェォ爼ソ爼ィ Name[he]=Dolphin Name[hi]=爨。爭霞、イ爭財、ォ爨シ爨ソ爨ィ Name[hne]=爨。爨セ爨イ爭財、ォ爨ソ爨ィ Name[hr]=Dolphin Name[hsb]=Dolphin Name[hu]=Dolphin Name[ia]=Dolphin Name[id]=Dolphin Name[is]=Dolphin Name[it]=Dolphin Name[ja]=Dolphin Name[ka]=Dolphin Name[kk]=Dolphin Name[km]=Dolphin Name[kn]=犂。犂セ犂イ犁財イォ犂ソ犂ィ犁・ Name[ko]=Dolphin Name[ku]=Dolphin Name[lt]=Dolphin Name[lv]=Dolphin Name[mai]=爨。爨セ爨イ爭財、ォ爨ソ爨ィ Name[mk]=ミ頒オミサム・クミス Name[ml]=犇。犒金エウ犒坂€財エォ犇ソ犇ィ犒坂€・ Name[mr]=爨。爭霞、イ爭財、ォ爨ソ爨ィ Name[ms]=Dolphin Name[nb]=Dolphin Name[nds]=Dolphin Name[ne]=爨。爨イ爭財、ォ爨ソ爨ィ Name[nl]=Dolphin Name[nn]=Dolphin Name[oc]=Dolphin Name[or]=牀。牀イ牀ォ牀ソ牀ィ Name[pa]=爲。爲セ爲イ爲ォ爲ソ爲ィ Name[pl]=Dolphin Name[pt]=Dolphin Name[pt_BR]=Dolphin Name[ro]=Dolphin Name[ru]=Dolphin Name[se]=Dolphin Name[si]=犖ゥ犢憫カス犢癌キ・キ亭カア犢・ Name[sk]=Dolphin Name[sl]=Dolphin Name[sr@ijekavian]=ミ頒オミサム・クミス Name[sr@ijekavianlatin]=Dolphin Name[sr@latin]=Dolphin Name[sr]=ミ頒オミサム・クミス Name[sv]=Dolphin Name[ta]=牋游ョセ牋イ牘財ョェ牋ソ牋ゥ牘・ Name[te]=牴。牴セ牴イ牾財ーォ牴ソ牴ィ牾・ Name[tg]=Dolphin Name[th]=犧扉クュ犧・犧游クエ犧・ Name[tr]=Dolphin Name[ug]=Dolphin Name[uk]=Dolphin Name[uz@cyrillic]=Dolphin Name[uz]=Dolphin Name[vi]=Dolphin Name[wa]=Dolphin Name[x-test]=xxDolphinxx Name[zh_CN]=Dolphin Name[zh_TW]=Dolphin Path= StartupNotify=true Terminal=false TerminalOptions= Type=Application X-DBUS-ServiceName= X-DBUS-StartupType= X-Desktop-File-Install-Version=0.22 X-DocPath=dolphin/index.html X-KDE-SubstituteUID=false X-KDE-Username=File-DesktopEntry-0.22/t/02_DesktopEntry.t0000644000175000017500000001227212632377464020161 0ustar michielmichieluse strict; use warnings; use Test::More; use File::DesktopEntry; $File::DesktopEntry::_locale = ''; # reset locale for testing my $file = File::Spec->catfile(qw/t applications foo.desktop/); $ENV{XDG_DATA_HOME} = 't'; is(File::DesktopEntry->lookup('foo'), $file, 'lookup works 1'); # Constructor 1 { my $entry = File::DesktopEntry->new('foo'); is($entry->get('Name'), 'Foo Viewer', 'new(NAME) works'); } # Constructor 2 { my $entry = File::DesktopEntry->new( \"[Desktop Entry]\nName=dusss\nType=Link\n" ); is($entry->get('Name'), 'dusss', 'new(\$TEXT) works'); } # Info { my $entry = File::DesktopEntry->new($file); is($entry->get('Name'), 'Foo Viewer', 'new(FILE) works'); is($entry->Name, 'Foo Viewer', 'AUTOLOAD works'); ok(! $entry->wants_uris, 'wants_uris()'); ok($entry->wants_list, 'wants_list()'); } # URI Parsing { my @uris = ( ['file:///foo/bar', '/foo/bar'], ['file:/foo/bar', '/foo/bar'], ['file://localhost/foo/bar', '/foo/bar'], ['file://foo/bar', 'smb://foo/bar'], ); SKIP: { skip("Win32 specific uri parsing", 2) unless $^O eq 'MSWin32'; push @uris, ['file:///C:/foo', 'C:/foo'], # and not /C:/foo ['file:////foo/bar', 'smb://foo/bar'] ; } my $i = 0; for (@uris) { is( (File::DesktopEntry::_paths($$_[0]))[0], $$_[1], "URI parsing ".++$i ); } } # Check quoting rules { my $entry = File::DesktopEntry->new($file); $entry->set(Exec => q#fooview " #); my $text = $$entry{groups}[ $entry->_group() ]; ok( $text =~ /^Exec=fooview "\\\\""/m, "Exec escaping works 1"); # Checks run-away quotes are handled $entry->set(Exec => q#fooview $foo '( )' '%f' \\#); $text = $$entry{groups}[ $entry->_group() ]; ok( $text =~ /^Exec=fooview "\\\\\$foo" "\( \)" %f "\\\\\\\\"/m, "Exec escaping works 2"); # Simple field codes do not need quotes # in fact, do get skipped if quoted. # \\ in regex is \ in text # \ in exec becomes \\ when quoting Exec key # \\ in any value becomes \\\\ in set() # \\\\ in text is matched by \\\\\\\\ in regex *sigh* my @exec = $entry->parse_Exec('bar'); is_deeply(\@exec, ['fooview', '$foo', '( )', 'bar', '\\'], "Exec escaping works 3"); $entry->set('Group Foo', Exec => 'exec $'); is($entry->get('Group Foo', 'Exec'), 'exec $', 'no quoting different group'); # Exec should not be quoted here ! } # Test %F { my $entry = File::DesktopEntry->new($file); my $exec = $entry->parse_Exec(); is($exec, q#fooview#, 'parse_Exec works without args'); $exec = $entry->parse_Exec(qw#$bar baz file:///usr/share#); is($exec, q#fooview "\$bar" baz /usr/share#, 'parse_Exec works with %F'); my @exec = $entry->parse_Exec(qw#$bar baz file:///usr/share#); is_deeply(\@exec, ['fooview', '$bar', 'baz', '/usr/share'], 'parse_Exec works with %F - list context'); $entry->set(Exec => qw#fooview#); $exec = $entry->parse_Exec(qw/$bar baz/); is($exec, q#fooview "\$bar" baz#, 'parse_Exec defaults to %F'); } # Test %U if ( $^O ne 'MSWin32' ) { my $entry = File::DesktopEntry->new($file); $entry->set(Exec => q#fooview %%foo %U#); my $exec = $entry->parse_Exec('/usr/share', 'http://cpan.org'); is($exec, q#fooview %foo file:///usr/share http://cpan.org#, "parse_Exec works with %U"); my @exec = $entry->parse_Exec('/usr/share', 'http://cpan.org'); is_deeply(\@exec, ['fooview', '%foo', 'file:///usr/share', 'http://cpan.org'], "parse_Exec works with %U - list context"); } # on Windows paths are different - lame fix for tests else { my $entry = File::DesktopEntry->new($file); $entry->set(Exec => q#fooview %%foo %U#); my $exec = $entry->parse_Exec('C:/usr/share', 'http://cpan.org'); is($exec, q#fooview %foo file:///C:/usr/share http://cpan.org#, "parse_Exec works with %U"); my @exec = $entry->parse_Exec('C:/usr/share', 'http://cpan.org'); is_deeply(\@exec, ['fooview', '%foo', 'file:///C:/usr/share', 'http://cpan.org'], "parse_Exec works with %U - list context"); } # Other keys { my $entry = File::DesktopEntry->new($file); $entry->set(Exec => q#fooview %%foo %D#); my $exec = $entry->parse_Exec('/foo/bar/baz/dus/tja', './t'); is($exec, q#fooview %foo /foo/bar/baz/dus/ ./t#, "parse_Exec works with %D"); for ( ['%f', '/foo'], ['%u', 'http://cpan.org'], ['%d', './t'] ) { $entry->set(Exec => "fooview $$_[0]"); is_deeply([$entry->parse_Exec($$_[1])], ['fooview', $$_[1]], "parse_Exec works with $$_[0]"); } $entry->set(Exec => q#fooview %%foo %m %i %c %k#); $exec = $entry->parse_Exec(); my ($f, $i, $n) = map File::DesktopEntry::_quote($_), $file, map $entry->get($_), qw/Icon Name/; is($exec, qq#fooview %foo --icon $i $n $f#, "parse_Exec works with %i, %c and %k"); } # Check errors { my $entry = File::DesktopEntry->new($file); $entry->set(Exec => q#fooview %x#); eval {$entry->parse_Exec()}; print "# message: $@\n"; ok($@, 'parse_Exec dies on unsupported field'); $entry->set(Exec => q#fooview %f#); eval {$entry->parse_Exec(qw/foo bar baz/)}; print "# message: $@\n"; ok($@, 'parse_Exec dies when multiple args not supported'); } $file = File::Spec->catfile(qw/t applications rt65394.desktop/); my $entry = File::DesktopEntry->new($file); is($entry->get('Name'), 'caja', 'new(FILE) works'); is($entry->Name, 'caja', 'AUTOLOAD works'); is($entry->Path, '', 'Path is empty string'); done_testing; File-DesktopEntry-0.22/t/01_data.t0000644000175000017500000000604312624422026016417 0ustar michielmichieluse strict; use warnings; use Test::More tests => 25; use_ok('File::DesktopEntry'); $File::DesktopEntry::_locale = ''; # reset locale for testing my $file = File::Spec->catfile(qw/t applications foo.desktop/); my $entry = File::DesktopEntry->new($file); is($$entry{file}, $file, 'new(FILE) works'); $entry = File::DesktopEntry->new_from_file($file); is($$entry{file}, $file, 'new_from_file(FILE) works'); ok(! $$entry{groups}, 'no premature hashing'); is( $entry->get('Comment'), 'The best viewer for Foo objects available!', 'get() works'); is( $entry->get('Comment[eo]'), 'Tekstredaktilo', 'get() works with locale string' ); is( $entry->get('Comment[ja]'), "\x{30c6}\x{30ad}\x{30b9}\x{30c8}\x{30a8}\x{30c7}\x{30a3}\x{30bf}", 'get() works with locale in utf8' ); is( $entry->get('Desktop Action Edit', 'Name'), 'Foo Viewer (edit image)', 'get() works with alternative group' ); is( $entry->get_value('Comment'), 'The best viewer for Foo objects available!', 'get_value() works' ); is( $entry->get_value('Name', 'Desktop Action Edit'), 'Foo Viewer (edit image)', 'get_value() works with alternative group' ); is( $entry->get('Foo'), undef, 'Non-existing key'); is( $entry->get('Foo', 'Foo'), undef, 'Non-existing group'); my $buffer = <new_from_data($buffer); #use Data::Dumper; warn Dumper $entry; is($entry->get('Name'), 'Foo!', 'new_from_data() works'); is(scalar(@{$$entry{groups}}), 2, 'number of groups correct'); is($entry->text, $buffer, 'text() works'); my $i = 0; for ( ['C' => ''], ['lang_COUNTRY.enc@MOD' => 'lang_COUNTRY@MOD|lang_COUNTRY|lang@MOD|lang'], ['lang_COUNTRY.enc' => 'lang_COUNTRY|lang'], ['lang@MOD' => 'lang@MOD|lang'], ['lang' => 'lang'] ) { ++$i; is( File::DesktopEntry::_parse_lang($$_[0]), $$_[1], "language parsing $i"); } $entry->set('Name[nl]' => 'dus ja'); is($entry->get('Name[nl_BE]'), 'dus ja', 'language parsing in get()'); $entry->set('Name[C]' => 'Something new'); is($entry->get('Name[POSIX]'), 'Something new', 'Aliases for default locale'); $ENV{XDG_DATA_HOME} = 't'; $file = File::Spec->catfile(qw/t applications bar baz.desktop/); $$entry{name} = 'bar-baz'; is($entry->_data_home_file, $file, 'correct file name generated'); rmdir( File::Spec->catdir(qw/t applications bar/) ); # clean up $file = File::Spec->catfile('t', 'applications', 'bar.desktop'); $entry = File::DesktopEntry->new; $entry->set(Type => 'Application', Name => 'Bar'); $entry->set('Some Action', Run => 'bar'); $entry->write($file); $entry = File::DesktopEntry->new($file); is($entry->text, "[Desktop Entry] Version=1.0 Encoding=UTF-8 Type=Application Name=Bar [Some Action] Run=bar ", 'write/read'); unlink($file); # clean up my $text = "[Desktop Entry] Version=1.0 Encoding=UTF-8 # the field below gives the name Name=Bar Type=Application "; $entry = File::DesktopEntry->new(\$text); $entry->set(Name => 'MyBar'); $text =~ s/Bar/MyBar/; is($entry->text, $text, 'comments are preserved'); File-DesktopEntry-0.22/t/04_pod_ok.t0000644000175000017500000000025012624422026016756 0ustar michielmichieluse Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok( Test::Pod::all_pod_files(qw/bin lib/) ); File-DesktopEntry-0.22/t/05_pod_cover.t0000644000175000017500000000044112624422026017466 0ustar michielmichieluse Test::More; use File::BaseDir qw/xdg_data_dirs/; $ENV{XDG_DATA_DIRS} = join ':', 'share', xdg_data_dirs; eval "use Test::Pod::Coverage 1.00"; plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@; all_pod_coverage_ok( { also_private => [ qr/^_/ ] } ); File-DesktopEntry-0.22/t/uri_escape.t0000644000175000017500000000150312632377464017337 0ustar michielmichieluse strict; use warnings; use Test::More; use File::DesktopEntry; use utf8; plan skip_all => "Windows" if $^O eq 'MSWin32'; my $buffer = <new_from_data($buffer); # Test escaping reserved and unicode characters $entry->set(Exec => q#/bin/foo %U#); my @exec = $entry->parse_Exec("/home/#=& €"); is_deeply(\@exec, ['/bin/foo', 'file:///home/%23%3D%26%20%E2%82%AC'], "parse_Exec works with %U - special characters"); # Test unescaping characters $entry->set(Exec => q#/bin/foo %F#); @exec = $entry->parse_Exec("file:///home/#=& € €", 'file:///home/%23%3D%26%20%E2%82%AC €'); is_deeply(\@exec, ['/bin/foo', "/home/#=& € €", "/home/#=& € €"], "parse_Exec works with %F - special characters"); done_testing; File-DesktopEntry-0.22/t/03_run.t0000644000175000017500000000237712624422026016322 0ustar michielmichieluse strict; use warnings; use File::DesktopEntry; $| = 1; #$File::DesktopEntry::VERBOSE = 1; # Because this test runs external processes we can not use Test::More. # Parts taking place in external processes do not show in testcover print "1..4\n"; my $perl = $^X; my $entry = File::DesktopEntry->new(); $entry->set( Name => 'test', Type => 'Application', Exec => qq#"$perl" -e 'print "ok 1 - system() works\n"'#); #warn ">>>\n", $entry->text(), "<<<\n"; $entry->system(); $entry->set( Exec => qq#"$perl" -e 'print "ok 2 - run() works\n"'# ); my $pid = $entry->run(); if ($^O eq 'MSWin32') { $pid->Wait(&Win32::Process::INFINITE); } else { waitpid($pid, 0) } $entry->set( Exec => qq#"$perl" -e 'print ""'#, Path => 't/applications' ); $entry->system(); print( (-f 'MANIFEST' ? 'ok' : 'nok'), " 3 - directory reset properly when using Path\n" ); $entry->set( Exec => qq#"$perl" -e 'print( (-f "foo.desktop" ? "ok" : "nok"), " 4 - exec() works using Path\n")'# ); if ($^O eq 'MSWin32') { print "ok 4 # skip fork() not supported\n"; } else { # not sure why, but gives ugly result on Win32 # probably due to fork() emulation $pid = fork; unless ($pid) { $entry->exec(); print "nok 4"; # not supposed to make it this far exit 1; } waitpid($pid, 0); } File-DesktopEntry-0.22/t/06_changes.t0000644000175000017500000000020312624422026017113 0ustar michielmichieluse Test::More; eval 'use Test::CPAN::Changes'; plan skip_all => 'Test::CPAN::Changes required for this test' if $@; changes_ok(); File-DesktopEntry-0.22/Makefile.PL0000644000175000017500000000206712632377464016550 0ustar michielmichieluse strict; use warnings; use 5.008_001; use ExtUtils::MakeMaker; WriteMakefile ( 'NAME' => 'File::DesktopEntry', 'ABSTRACT' => 'Module to handle .desktop files', 'AUTHOR' => 'Jaap Karssenberg ', 'DISTNAME' => "File-DesktopEntry", 'VERSION_FROM' => 'lib/File/DesktopEntry.pm', 'LICENSE' => 'perl', 'MIN_PERL_VERSION' => '5.8.6', 'PREREQ_PM' => { 'Carp' => 0, 'Encode' => 0, 'File::Spec' => 0, 'File::Path' => 0, 'File::BaseDir' => '0.03', 'URI::Escape' => 0, ($^O eq 'MSWin32' ? ('Win32::Process' => 0) : ()), }, 'CONFIGURE_REQUIRES' => { "ExtUtils::MakeMaker" => "6.30" }, 'LIBS' => [''], 'dist' => { COMPRESS => "gzip -9f", SUFFIX => "gz", }, 'test' => { 'TESTS' => "t/*.t" }, META_MERGE => { resources => { repository => 'https://github.com/mbeijen/File-DesktopEntry', bugtracker => 'https://github.com/mbeijen/File-DesktopEntry/issues', }, }, ); File-DesktopEntry-0.22/META.json0000664000175000017500000000252012632401443016174 0ustar michielmichiel{ "abstract" : "Module to handle .desktop files", "author" : [ "Jaap Karssenberg " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "File-DesktopEntry", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "runtime" : { "requires" : { "Carp" : "0", "Encode" : "0", "File::BaseDir" : "0.03", "File::Path" : "0", "File::Spec" : "0", "URI::Escape" : "0", "perl" : "5.008006" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/mbeijen/File-DesktopEntry/issues" }, "repository" : { "url" : "https://github.com/mbeijen/File-DesktopEntry" } }, "version" : "0.22", "x_serialization_backend" : "JSON::PP version 2.27300" } File-DesktopEntry-0.22/MANIFEST.SKIP0000644000175000017500000000016012624642563016460 0ustar michielmichiel\B\.git\b ^blib\/ pm_to_blib \~$ ^Makefile(\.old)?$ .gitignore .travis.yml \.bak$ ^MYMETA ^File-DesktopEntry-\d File-DesktopEntry-0.22/META.yml0000664000175000017500000000145212632401443016027 0ustar michielmichiel--- abstract: 'Module to handle .desktop files' author: - 'Jaap Karssenberg ' build_requires: ExtUtils::MakeMaker: '0' configure_requires: ExtUtils::MakeMaker: '6.30' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: File-DesktopEntry no_index: directory: - t - inc requires: Carp: '0' Encode: '0' File::BaseDir: '0.03' File::Path: '0' File::Spec: '0' URI::Escape: '0' perl: '5.008006' resources: bugtracker: https://github.com/mbeijen/File-DesktopEntry/issues repository: https://github.com/mbeijen/File-DesktopEntry version: '0.22' x_serialization_backend: 'CPAN::Meta::YAML version 0.017' File-DesktopEntry-0.22/Changes0000644000175000017500000000273312632400050016043 0ustar michielmichiel0.22 2015-12-10 - Fix issue on Windows with File URIs - Correctly state runtime dependencies 0.21 2015-11-25 - Documentation changes only. 0.20 2015-11-23 - Fix opening files with special characters RT 93168 - fix provided by Romain Vavassori. 0.12 2015-06-20 - Remove spurious Module::Build from test. Reported by gregor herrmann, Debian team, https://bugs.debian.org/789210 0.11 2015-06-11 - Explicitly state minimum perl version as 5.8 in Makefile.PL. 0.10 2015-06-09 - Include new test in MANIFEST RT 105112 - SREZIC 0.09 2015-06-09 - Exclude newlines from whitespace on either side of '=' RT 65394, fix by sdme. 0.08 2013-10-07 - Corrected build instructions. 0.07 2013-10-03 - Fixed dependency on Win32 module. 0.06 2013-10-03 - Switched to EU::MM - POD fix - RT 89116 - GWOLF 0.05 2013-06-05 - Fixed tests on Windows - RT 45669 - Set perl 5.8.6 as minimum version - RT 42770 - ANDK - Fixed link to freedesktop.org - RT 37320 - GWOLF 0.04 2007-11-04 Hot fix release - POSIX does not export LC_MESSAGES on all platforms - Removed POSIX dependency 0.03 2007-11-04 - Added support for writing Desktop Entry files - Updated to version 1.0 of the specification - Added much more sanity checks while handling data - Extended unit tests to almost full coverage - Added support for basic functions on Windows 0.02 2005-10-08 - Fixed proper conversion between paths and uris - Added wants_list() and wants_uris() 0.01 2005-10-03 - Initial Release File-DesktopEntry-0.22/MANIFEST0000644000175000017500000000065512632401443015711 0ustar michielmichielChanges lib/File/DesktopEntry.pm Makefile.PL MANIFEST This list of files MANIFEST.SKIP README.md t/01_data.t t/02_DesktopEntry.t t/03_run.t t/04_pod_ok.t t/05_pod_cover.t t/06_changes.t t/applications/foo.desktop t/applications/rt65394.desktop t/uri_escape.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker)