# $obj->fooify(1,2,3) or fooify(10,20,30) # always expects 3 "real" args sub fooify { my $self; $self = shift if @_ == 4; # if 4 args, the first is the object/clas +s my ($x, $y, $z) = @_; # ... }
sub fooify { my $self; $self = shift if UNIVERSAL::isa($_[0], __PACKAGE__); my ($x, $y, $z) = @_; # ... }
In reply to Re: OO perl query
by japhy
in thread OO perl query
by rsennat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |