Subject: | configfile default does not work for code refs |
Date: | Wed, 30 Sep 2009 12:58:45 +0100 |
To: | "'bug-MooseX-Getopt [...] rt.cpan.org'" <bug-MooseX-Getopt [...] rt.cpan.org> |
From: | Gordon Irving <gordon.irving [...] sophos.com> |
When the default for configfile is a code ref the call on the attribute to $cfmeta->default returns the code ref, this is then treated in scalar context so the module cannot find the configfile. I have pushed a fix to the topic/default_with_instance at git.moose.perl.org. Its a trival change of using the $class variable as a param to default which then evaluates the codref.
Show quoted text
________________________________
Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 348 3873 20.