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;
----------------
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.