Skip Menu |
 

This queue is for tickets about the Config-Auto CPAN distribution.

Report information
The Basics
Id: 19938
Status: resolved
Priority: 0/
Queue: Config-Auto

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.17
Fixed in: (no value)



Download (untitled) / with headers
text/plain 852b
If there is no XML::Simple to be found, and parse is asked to look at an XML File, it croaks with an unhelpful error message: Can't use string ("") as a subroutine ref while "strict refs" in use at //ms/dist/perl5/PROJ/Config-Auto/0.12/lib/perl5/Config/Auto.pm line 74 The score subroutine scores 'xml' as the best (and only option). The parse function then blindly dispatches the method in the method hash. But if XML::Simple failed to load, the 'xml' method is rudely removed from the method table. So please die if XML::Simple cannot be loaded, or die if xml scores and we haven't loaded it into %INC, or don't dispatch the method blindly, instead do something like this on line 74: return $methods{$method}->($file) if exists $methods{$method}; return; or any of a myriad other ways that don't obfuscate the underlying problem. Thanks!
Download (untitled) / with headers
text/plain 703b
On Fri Jun 16 09:55:00 2006, guest wrote: Show quoted text
> If there is no XML::Simple to be found, and parse is asked to look at an > XML File, it croaks with an unhelpful error message: > > Can't use string ("") as a subroutine ref while "strict refs" in use at > //ms/dist/perl5/PROJ/Config-Auto/0.12/lib/perl5/Config/Auto.pm line 74
Thanks for reporting. I've just uploaded Config::Auto 0.18 which holds a fix for this issue. From the changes file: 0.18 Wed Jun 28 12:22:29 2006 ================================ - Address #19938 which states that calling parse() on an xml config without XML::Simple installed dies ungracefully. As of this version, better diagnostics will be provided.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.