in reply to why is a 2-argument bless not working in my situation
There is no '$self' in the argument list when you call new like that. The assignment in new() should just be:sub new { my ($self,$class)=@_; .... our $cache=Fiets::Cache->new();
And your use of base is um, just wrong. 'use base' is meant to be set at a package level, and when you use it, you don't need the 'use *package*' line. Is your cachedir set once per program, and you want to inherit from Cache::FileCache or Cache::NullCache based on it per program run, or can it change per instance of an object? I'm not going to guess at what you want there.my ($class) = @_; # or # my $class = shift;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: 2-argument bless not working?!
by eXile (Priest) on Mar 31, 2004 at 01:44 UTC | |
by djantzen (Priest) on Mar 31, 2004 at 10:48 UTC |