Subject: | A careless documentation error |
The new() subroutine takes the hash format args
File::XDG->new( name => 'appfoo' );
I know this because I had to look at the source - for a module this simple :-(.
The SYNOPSIS documentation says:
use File::XDG;
my $xdg = File::XDG->new('foo');
Has to be instead:
my $xdg = File::XDG->new( name => 'foo');
The result is
use File::XDG;
my $xdg = File::XDG->new('foo');
Has to be instead:
my $xdg = File::XDG->new( name => 'foo');
Results of using documented code are: Odd number of elements in hash assignment at /usr/local/share/perl/5.14.2/File/XDG.pm line 71
I do not submit patches for mistakes this careless and trivial.
Cheers.