CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
'Can't call method without a package"...


New User

Jan 31, 2003, 11:43 AM

Post #1 of 2 (730 views)
'Can't call method without a package"... Can't Post

I have a script that runs perfectly on one machine but running it on another machine gives me the following message:

"Can't call method "value" without a package or object reference".

Here is the line the error is occurring on:

output('<jdtoc ',
'pubnum="', $data->attribute('PUBNUM')->value, '" ',
'langcode="', $data->attribute('LANGCODE')->value, '" ',
'versdate="', $data->attribute('VERSDATE')->value, '"',
'>', "\n"

Both machines a running the same version of Perl.

Anyone seen this before and how to resolve it?

(This post was edited by dan61265 on Jan 31, 2003, 11:44 AM)


Jan 31, 2003, 12:10 PM

Post #2 of 2 (725 views)
Re: [dan61265] 'Can't call method without a package"... [In reply to] Can't Post

The return value from the attribute() method must be an object or class in order for the value() method to be called.

This error seems to suggest that nothing is being returned, or at least not an object or class name.

Print each of those lines individually to find out which is failing and then hopefully you can backtrack to find why it is failing.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives