Subject: | uninit warning in XMLENC() |
The /e flags on the substituions in XMLENC() aren't necessary, and the 2nd and 3rd cause warnings.
$ perl -Ilib -mXML::ASCX12 -lwe 'print XML::ASCX12::XMLENC "a\x01b"' | cat -tev
Use of uninitialized value in substitution iterator at lib/XML/ASCX12.pm line 328.
ab$
$ _
--- lib/XML/ASCX12.pm.~1~ 2004-09-28 10:59:34.000000000 -0400
+++ lib/XML/ASCX12.pm 2005-07-18 11:45:14.000000000 -0400
@@ -323,9 +323,9 @@
my $str = $_[0];
if ($str)
{
- $str =~ s/([&<>"])/$_XMLREP{$1}/ge; # relace any &<>" characters
- $str =~ s/[\x80-\xff]//ge; # get rid on any non-ASCII characters
- $str =~ s/[\x01-\x1f]//ge; # get rid on any non-ASCII characters
+ $str =~ s/([&<>"])/$_XMLREP{$1}/g; # relace any &<>" characters
+ $str =~ s/[\x80-\xff]//g; # get rid on any non-ASCII characters
+ $str =~ s/[\x01-\x1f]//g; # get rid on any non-ASCII characters
}
return $str;
}