in reply to Storing hash to disk with variable name

Storable doesn't store the name of the variable (that would only be marginally useful, if at all). But what it does store is the class name of any blessed structure. My bet is that whatever is stored in the file "func_data" was a hashref blessed into the class FuncAssociateData. And what you are storing in "new_func_data" is no longer blessed, so FuncAssociateData doesn't appear there.

Abigail

  • Comment on Re: Storing hash to disk with variable name

Replies are listed 'Best First'.
Re: Re: Storing hash to disk with variable name
by guu (Initiate) on Feb 23, 2004 at 17:09 UTC
    Thanks Abigail, that sounds very much like the kind of explanation I was looking for !!!

    Now please for the Perl challenged programmer who only uses Python and C:

    How do I "bless a hashref into the class FuncAssociateData" ???

      How do I "bless a hashref into the class FuncAssociateData" ???
      Take a guess.

      Abigail

        Sorry for asking such a silly question - I 'blessed' now and it stores the name and works fine with the program.

        Thanks again!