# from Alan Campbell
# on Saturday 05 January 2008 13:58:
>[~] # ./get_rom_symbols /home/user/temp/app.xml -s=.bios
>Can't locate object method "new" via package "XML::LibXML::SAX" at
> XML/SAX/ParserFactory.pm line 43.
Did you bundle XML::LibXML::SAX and all of its binary bits.
If so, then maybe you're seeing this issue: The ParserFactory makes no
sense in a pre-packaged environment because parser auto-selection is
useless (the parser is selected by the packaging stage.)
To deal with that, you either have to package the ParserDetails.ini file
or insert something like this workaround or come up with an XML::SAX
patch that plays nice with PAR.
BEGIN {
use XML::SAX 0.14 ();
use XML::SAX::Expat;
# force parser selection (should match what you bundled)
$XML::SAX::ParserPackage = 'XML::SAX::Expat';
# and bugfix the fact that reading ParserDetails.ini is pointless now
{
no warnings 'redefine';
sub XML::SAX::parsers {[]};
sub XML::SAX::load_parsers {Carp::confess("why did that happen");};
}
}
--Eric
--
Don't worry about what anybody else is going to do. The best way to
predict the future is to invent it.
--Alan Kay
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------