CC: | Gonéri Le Bouder <goneri [...] rulezlan.org> |
Subject: | Can't use XML::SAX in a PAR::Packer standalone due to ParserDetails.ini problem |
Date: | Thu, 31 Jul 2008 14:42:26 +0200 |
To: | bug-XML-SAX [...] rt.cpan.org, bug-PAR-Packer [...] rt.cpan.org |
From: | Nicolas Dorfsman <ndo [...] unikservice.com> |
Hi,
I've a problem somewhat similar to :
http://rt.cpan.org/Public/Bug/Display.html?id=243
XML::SAX->load_parsers is looking for its file "ParserDetails.ini" in
the directory where XML::SAX is 'installed':
====
# get directory from wherever XML::SAX is installed
if (!$dir) {
$dir = $INC{'XML/SAX.pm'};
$dir = dirname($dir);
}
my $fh = gensym();
if (!open($fh, File::Spec->catfile($dir, "SAX", PARSER_DETAILS))) {
XML::SAX->do_warn("could not find " . PARSER_DETAILS . " in
$dir/SAX\n");
return $class;
}
====
But with a pp package, modules are hashed and put in a flat directory
where there is no ParserDetails.ini file. This file is in $INC{'XML/
SAX.pm'}/incl/lib/SAX
Look :
[dorfsman@mybox /var/tmp/par-dorfsman/
cache-48311071b9899ece97d9167f761db026701fd69e]$ head -5 fef4da66.pm
#line 1 "XML/SAX.pm"
# $Id: SAX.pm,v 1.29 2007/06/27 09:09:12 grant Exp $
package XML::SAX;
[dorfsman@t22prod /var/tmp/par-dorfsman/
cache-48311071b9899ece97d9167f761db026701fd69e]$ find . -name
ParserDetails.ini
./inc/lib/XML/SAX/ParserDetails.ini
I'm really embarrassed with this !
Why don't you try to include these ini-parameters in a pm ?
Nicolas