I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2010-02-10 10:55:15.725024-08 by kfcnhl
ERROR when constructing objects
Not a HASH reference at C:/perl/site/5.10.1/lib/SOAP/WSDL/XSD/Typelib/ComplexTyp e.pm line 286. at C:/perl/site/5.10.1/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm line 286 SOAP::WSDL::XSD::Typelib::ComplexType::__ANON__[C:/perl/site/5.10.1/lib/ SOAP/WSDL/XSD/Typelib/ComplexType.pm:312]('HeavyElements::submitGetDataRequest', 'HeavyTypes::GetDataHeaders=SCALAR(0x227d36c)', 'HeavyTypes::Fields=SCALAR(0x22 7dbcc)', 'HeavyTypes::Instruments=SCALAR(0x22cb93c)', 'HeavyTypes::Macro=SCALAR( 0x22cb34c)') what does this error usually mean? This is the line that I am trying to exectue. my $request = HeavyElements::submitGetDataRequest->new($header,$fields,$instrumentsType,$macro); NAME HeavyElements::submitGetDataRequest DESCRIPTION Perl data type class for the XML Schema defined element submitGetDataRequest from the namespace http://services.bloomberg.com/datalicense/dlws/ps/20071001. METHODS new my $element = HeavyElements::submitGetDataRequest->new($data); Constructor. The following data structure may be passed to new(): { # HeavyTypes::SubmitGetDataRequest headers => { # HeavyTypes::GetDataHeaders }, fields => { # HeavyTypes::Fields field => $some_value, # string }, instruments => { # HeavyTypes::Instruments instrument => { # HeavyTypes::Instrument id => $some_value, # string }, }, }, macro => { # HeavyTypes::Macro primaryQualifier => { # HeavyTypes::PrimaryQualifier primaryQualifierType => $some_value, # MacroType primaryQualifierValue => $some_value, # string }, secondaryQualifier => { # HeavyTypes::SecondaryQualifier secondaryQualifierType => $some_value, # SecondaryQualifierType secondaryQualifierOperator => $some_value, # SecondaryQualifierOper ator secondaryQualifierValue => $some_value, # string }, }, }, }, AUTHOR Generated by SOAP::WSDL
Direct Responses: 12385 | Write a response
Posted on 2010-02-13 23:53:37.868499-08 by mkutter in response to 12360
Re: ERROR when constructing objects
hi ,
the error means exactly what it says: Some element, which is expected to be a hash reference, is something else.
Looks like you stuffed something into the method, which does not comply to the structure the generated class expects - but I can't tell without knowing what you passed in.
Martin
Direct Responses: Write a response