Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Library problems with XML::Compile::WSDL11 and Math::BigInt

by space_monk (Chaplain)
on Jan 06, 2011 at 17:28 UTC ( #880884=perlquestion: print w/ replies, xml ) Need Help??
space_monk has asked for the wisdom of the Perl Monks concerning the following question:

Solution

Math::BigInt doesn't like a change of array field separator

$"='/';

Thanks for your help

Problem

I have tried updating various libraries, but I find I cannot remove the following errors.

Bareword found where operator expected at (eval 149) line 1, near "qw/ +Math::BigInt::FastCalc/SCALAR" Bareword found where operator expected at (eval 150) line 1, near "qw/ +Math::BigInt::FastCalc/SCALAR" Bareword found where operator expected at (eval 151) line 1, near "qw/ +Math::BigInt::FastCalc/SCALAR" Couldn't load any math lib(s), not even fallback to Calc.pm at /Librar +y/Perl/5.8.9/XML/Compile/Schema/BuiltInTypes.pm line 20 BEGIN failed--compilation aborted at /Library/Perl/5.8.9/XML/Compile/S +chema/BuiltInTypes.pm line 20. Compilation failed in require at /Library/Perl/5.8.9/XML/Compile/Schem +a/Specs.pm line 16. BEGIN failed--compilation aborted at /Library/Perl/5.8.9/XML/Compile/S +chema/Specs.pm line 16. Compilation failed in require at /Library/Perl/5.8.9/XML/Compile/Schem +a.pm line 22. BEGIN failed--compilation aborted at /Library/Perl/5.8.9/XML/Compile/S +chema.pm line 22. Compilation failed in require at (eval 144) line 3. ...propagated at /System/Library/Perl/5.8.9/base.pm line 93. BEGIN failed--compilation aborted at /Library/Perl/5.8.9/XML/Compile/C +ache.pm line 12. Compilation failed in require at (eval 143) line 3. ...propagated at /System/Library/Perl/5.8.9/base.pm line 93. BEGIN failed--compilation aborted at /Library/Perl/5.8.9/XML/Compile/W +SDL11.pm line 12.
The package where this happens starts as follows
package Suppliers::MySupplier; use HTTP::Cookies; use SOAP::Lite; # use SOAP::Lite +trace => debug; use SOAP::WSDL; use LWP::UserAgent; use HTTP::Request::Common; use Data::Dumper; use Suppliers::sbase; use Cwd; use Text::CSV; use JSON::XS; use XML::Compile::WSDL11; use XML::Compile::SOAP11; use XML::Compile::Transport::SOAPHTTP;
Commenting out the first two XML::Compile statements removes these errors, but I need these libraries later in the code. I am seeking enlightenment and education in the error of my ways.

System Info

System: Macbook Pro (Darwin Kernel Version 10.4.0)
Perl v5.8.9
Math::BigInt is v 1.99 Math::BigInt::FastCalc is at v0.24
There are no modifications to any official CPAN library

Comment on Library problems with XML::Compile::WSDL11 and Math::BigInt
Select or Download Code
Re: Library problems with XML::Compile::WSDL11 and Math::BigInt
by ikegami (Pope) on Jan 06, 2011 at 17:58 UTC

    Looks like improper code is being generated by XML::Compile::Schema::BuiltInTypes, but line 20 makes no sense as the source of the error. What version of XML::Compile are you using? Start by upgrading it.

    Update: No, that's not right.

      I have the same problem too, I have XML-Compile-1.21 This is the version I get with a force install from CPAN.

        Why did you have to force the install?

        It seems to me that if you have problems with a module after having to force its installation, you chose to ignore a relevant error.

Re: Library problems with XML::Compile::WSDL11 and Math::BigInt
by ikegami (Pope) on Jan 06, 2011 at 18:32 UTC

    The error comes from Math::BigInt, not XML::Compile::Schema::BuiltInTypes. It has to come from the following line in sub import:

    eval "use $lib qw/@c/;";

    The thing is, you shouldn't be seeing the error messages from that line, and you shouldn't be getting that error from that line. What's your version of Math::BigInt?

    perl -MMath::BigInt -le'print Math::BigInt->VERSION'

    Did you modify it? Please post the import sub from the file given by perldoc -l Math::BigInt.

    perl -ne'print if /^sub import/.../^sub/' `perldoc -l Math::BigInt`

    Note that the eval line should probably be the following, but it doesn't matter since the imports are ignored.

    eval "use $lib qw/\@c/;";
      Math::BigInt is v1.99 There are no modifications to the official libraries.

        Then how is $@ getting printed? And how is "SCALAR" getting added after the second slash or how is "/SCALAR" added to @c?

        It's has to be that line based on the number of messages you get, the presence of "qw/Math::BigInt::FastCalc", the line number inside the eval at which it occurs, and the resulting failure to load any backends.

        Please post the import sub from the file given by perldoc -l Math::BigInt.

        perl -ne'print if /^sub import/.../^sub/' `perldoc -l Math::BigInt`

        For what it's worth, I don't get the error.

        $ for q in \ > XML::Compile \ > XML::Compile::WSDL11 \ > Math::BigInt \ > Math::BigInt::FastCalc > do > perl -M$q -le'print "$ARGV[0] ", $ARGV[0]->VERSION' $q > done XML::Compile 1.21 XML::Compile::WSDL11 2.21 Math::BigInt 1.99 Math::BigInt::FastCalc 0.24 $ perl -v | grep version This is perl 5, version 12, subversion 2 (v5.12.2) built for i686-linu +x $ perl -le' > use XML::Compile::WSDL11; > use XML::Compile::SOAP11; > use Math::BigInt; > print "ok"; > ' ok

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://880884]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2014-08-28 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (257 votes), past polls