uperl / File-XDG

Basic implementation of the XDG base directory specification
1 stars 0 forks source link

corak on unexpected constructor arg #12

Closed Smylers closed 2 years ago

Smylers commented 2 years ago

Hi there. Thanks for File::XDG. If the constructor is provided with an unexpected argument (in addition to the required name argument), then it dies with an error message. Which indeed it is supposed to ... but not like this:

perl -MFile::XDG -E "say File::XDG->new(name => 'whatever', unexpected => 'something else')"
Undefined subroutine &File::XDG::corak called at /usr/local/share/perl/5.30.0/File/XDG.pm line 23.

Version 0.06 introduced the errant “corak”.

plicease commented 2 years ago

Thanks for reporting this! An easy fix fortunately. This should be addressed in 0.08 now headed to CPAN.