[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] use Storable;



On Jan 13, 2007, at 12:03 PM, Jay Hannah wrote:
...later, in a different program...

    my $stats = retrieve("stats.Storable");

Oh, wacky... Calling methods on the $stats object doesn't actually work until I throw use statements in my program for $stats and all the objects inside $stats.

So my $stats object is back in Perl but retarded until I add the necessary use statements. :)

j


$ cat j.pl
use Storable;
my $stats = retrieve('stats.Storable');
$stats->report("out");

$ perl j.pl
Can't locate object method "report" via package "OpenLab::BlastStats" at j.pl line 7.
$


$ cat j.pl
use Storable;
use OpenLab::BlastStats;
use OpenLab::Pools;
use OpenLab::H_Pools;
my $stats = retrieve('stats.Storable');
$stats->report("out");

$ perl j.pl
$