Subject: | Semantic error when embedding at the end of a script |
If you embed the module into a script like this:
# first your script
...
# then XML::Tiny module
package XML::Tiny;
...
you'll get a semantic error due to the fact that the %regexps variable
is not initialised. I'd suggest this little change, from the current
my %regexps = (
name => '[:a-z][\\w:\\.-]*'
);
to
my %regexps;
BEGIN {
%regexps = (
name => '[:a-z][\\w:\\.-]*'
);
}
The other "global" variable $strict_entity_parsing shouldn't suffer from
this problem.