Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Error while using packaged file using pp

by m_k_venkataraman (Initiate)
on Sep 23, 2014 at 14:07 UTC ( [id://1101641]=perlquestion: print w/replies, xml ) Need Help??

m_k_venkataraman has asked for the wisdom of the Perl Monks concerning the following question:

I have just started learning Perl. I am developing a small quality check module for JATS XML.

While my Perl program is giving the desired output when executed as a standalone .pl program, it is giving me error as described below, if I execute the same program as package, packaged using PAR (pp -o file.exe file.pl).

Can you please let me know what may be the mistake I am doing in compilation? How can I avoid the error so that the packaged exe gives the same output (given below) as .pl execution.


-----------------Error
Couldn't load LWP based external entity handler Switching to file-based external entity handler (To avoid this message, use NoLWP option to XML::Parser) Failed to open http://cats.informa.com/tfjats/1.0/dtd/tfjats1.dtd: Invalid argument Handler couldn't resolve external entity at line 2, column 153, byte 196 error in processing external entity reference at line 2, column 153, byte 196: <?xml version="1.0" encoding="US-ASCII"?> <!DOCTYPE article PUBLIC "-//TF//DTD JATS (Z39.96) v1.0 Taylor and Francis Journ al Content v1.0//EN" "http://cats.informa.com/tfjats/1.0/dtd/tfjats1.dtd"> <article article-type="Article" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns :tf="http://cats.informa.com/tfjats" xmlns="http://jats.nlm.nih.gov" tf:schema-v ersion="1.0" xml:lang="en"> <tf:article-status stage="just-accepted"> at XML/Parser.pm line 187.
-----------------


------------Output from .pl file
Journal Title-Id are equal in both xml files
Supplemental-Material id are equal xml file
Supplemental-Material xlink:href and Filename Are Equal
Content types are equal in both XML Files
Table Counts are correct.
Figure Counts are Correct.
References Counts are Correct.
----------------


----------------To invoke XML I am using
use strict;
use warnings;
use XML::XPath;
use XML::Parser;
use XML::XPath::XMLParser;
----------------
  • Comment on Error while using packaged file using pp

Replies are listed 'Best First'.
Re: Error while using packaged file using pp
by dasgar (Priest) on Sep 23, 2014 at 14:33 UTC

    I'd recommend taking a closer look through the documentation for pp. You probably need to use the -c and/or -x options, which are used to "determine additional run-time dependencies". If you're still having issues after that, you may need to try use -M to specifically add in other needed modules that the pp utility is failing to detect and add to the bundle.

Re: Error while using packaged file using pp
by Laurent_R (Canon) on Sep 23, 2014 at 18:58 UTC
    Well, do you really need to use PAR? I am asking the question because you say that you are new to Perl and, maybe, you think that this is a standard way of using Perl. It isn't. The usual way is to use standalone Perl programs, using the perl my_prog.pl command under most systems, the shebang line under Unix and extension configuration under Windows. There are cases where you want to use PAR, but it is not the most common way of doing things.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1101641]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-23 21:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found