in reply to Re^2: A few Perl OOP questions. (disparaging)
in thread A few Perl OOP questions.
Often it makes no real difference and the noise is about who is being forced to write code to accomodate someone else. I try to be more cooperative.
Usually I would write your new more like this.
Which gives a message like:sub new { my $class = shift( @_); croak "Bad class parameter" if not defined $class or ref $class; bless [@_], $class; }
Bad class parameter at file.pl line 100
What is it that you find fine about the idiom?
|
---|