Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#177 use of uninitialized value in maptypetouri()

0.71
open
Byrne Reese
Misc/Other (17)
5
2010-09-03
2010-09-03
Todd M. Lewis
No

In maptypetouri(), $name is sometimes uninitialized. I getting messages like this:
Use of uninitialized value $name in substitution (s///) at ./perl-5.10.1/lib/site_perl/5.10.1/SOAP/Lite.pm line 1058.
Use of uninitialized value $name in exists at ./perl-5.10.1/lib/site_perl/5.10.1/SOAP/Lite.pm line 1059.
Use of uninitialized value $name in hash element at ./perl-5.10.1/lib/site_perl/5.10.1/SOAP/Lite.pm line 1059.
Use of uninitialized value $name in hash element at ./perl-5.10.1/lib/site_perl/5.10.1/SOAP/Lite.pm line 1063.

The fix, I think, is to change line 1057
unless (defined $prefix)
to
unless (defined $prefix || !defined $name)

My web services are working anyway, btw.

Discussion

  • Todd M. Lewis
    Todd M. Lewis
    2010-09-17

    A better fix is to add this line after the call to my($prefix, $name) = SOAP::Utils::splitqname($type);

    $name = '' unless defined $name;

    This causes no change in behaviour, but the messages go away.