in reply to Re: Re: Re: Tracking processing by returning objects?
in thread Tracking processing by returning objects?
I've starting coding up my new and improved module, including feedback from BrowserUk.
The use of statements such as return $self->new( "$self->$filespec.munged" ); doesn't work, as the class fed to the new() method by all other methods is the object, not it's class so I used:
sub new { my $class_self = shift; # Could be a class, or an already blessed # object from another method. my $class; if (ref $class_self) { $class = ref $class_self } else { $class = $class_self; } my %arg = @_; my $self = { file => $arg{'filespec'} }; bless $self, $class; }
If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Tracking processing by returning objects?
by BrowserUk (Patriarch) on May 19, 2003 at 03:33 UTC | |
by BazB (Priest) on May 19, 2003 at 08:17 UTC |