ironicon has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks, I stored an object in CGI::Session, upon retrieving it I want to execute a method on it. However I get the following error
Can't locate object method "display" via package "Digilink::Ressource" at ../..//Digilink/View/AddRessource.pm line 152 (#1) (F) You called a method correctly, and it correctly indicated a pa +ckage functioning as a class, but that package doesn't define that parti +cular method, nor does any of its base classes. See perlobj.
However the object in question has a method called display, and the object Digilink::Ressource ist put in via "use" in the script (no errors there..)
Have I missed something there? Do I have to do some kind of dereferencing?
Sorry if I'm a bit vague but English is not my first language..
Peter

Replies are listed 'Best First'.
Re: Retrieving Objects from Sessions
by samtregar (Abbot) on Jan 31, 2006 at 17:59 UTC
    It looks like you need to load the Digilink::Resource module:

       use Digilink::Resource;

    The session module won't load it automatically, even though it can apparently thaw objects from this class.

    -sam

Re: Retrieving Objects from Sessions
by kwaping (Priest) on Jan 31, 2006 at 17:33 UTC
    Can you please post the code used to store and retrieve the object? Remember to wrap it in <code> tags. Thanks!
Re: Retrieving Objects from Sessions
by ironicon (Initiate) on Feb 01, 2006 at 12:12 UTC
    Thanks for your help, upon creating a short script with a testcase i fiddled around further and came up with an solution :
    If I call the method with

    Digilink::Ressource::display($Ressource);

    it works..

    Sorry to have you bothered
    Peter