in reply to •Re: Re: •Re: On goto
in thread On goto
What are your thoughts on using it in constructors of hash or array based objects for purposes of clarity?
For example:
sub new { my ($class) = @_; my $this = bless {}, $class; $this->{foo} = undef; $this->{bar} = undef; return $this; }
Where 'foo' and 'bar' may be initialized during the course of the program, but not at construction. To me, this makes it more clear what an instance of this class consists of. It also can make debugging easier if you are fond of Data::Dumpering as I am.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Re: •Re: Re: •Re: On goto
by merlyn (Sage) on Mar 01, 2003 at 06:32 UTC | |
|
Re: Re: •Re: Re: •Re: On goto
by Anonymous Monk on Mar 01, 2003 at 16:04 UTC |