in reply to encoding failure with XML::Twig
OHHHH! I completely missed the fact that you're using a packager. I thought pp was referring to "pretty print" (which is what your code does). What can I say? I use xml_pp quite often.
@XML::Parser::Expat::Encoding_Path is built from @INC. I bet that the problem is that your packager puts a callback function in @INC instead of the path to the files.
Assuming pp actually extracts the files to some directory, you can do:
BEGIN { my $path_to_enc_files = ...; $path_to_enc_files =~ s{/XML/Parser/Encodings/?\z}{}; local @INC = ( @INC, $path_to_enc_files ); require XML::Parser::Expat; }
According to almut's post, that boils down to
BEGIN { local @INC = ( @INC, $ENV{PAR_TEMP} ); require XML::Parser::Expat; }
Place this before the first use XML::Parser::Expat;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: encoding failure with XML::Twig
by chastevens (Initiate) on Nov 19, 2009 at 20:24 UTC | |
by ikegami (Patriarch) on Nov 20, 2009 at 19:30 UTC |