SOAP::Lite complains about "Can't use 'defined(%hash)'"

74 views Asked by At

While running the perl which is using SOAP::LITE module it is giving below error

Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at /Library/Perl/5.30/SOAP/Lite.pm line 466.

Perl Version: 5.30

How to resolve this error

2

There are 2 answers

0
ikegami On

I presume you mean "SOAP::Lite", not "SOAP::LITE". If so, you're not using the latest, and upgrading would surely fix this.

From the change log, it Looks like it was fixed in 0.713 back in 2011. That's over a decade ago!

2
Dave Cross On

Looks like you're seeing the combination of a couple of really old pieces of software:

  • defined %hash was deprecated in Perl 5.6.0 (in March 2000) and has thrown a fatal error since Perl 5.22.0 (in June 2015)
  • SOAP::Lite fixed that syntax in version 0.713 (in August 2011)

So the fix is to update your software!