in reply to Remove bless reference or class/package name from method arguments
Consider:
In the above, the assignments to $c, $d & $e result in slightly different invocations of addObjects(), but will all have the same post-run value - assuming the call to rmvObjRef() is removed/commented out.use NumObject; my ($a, $b) = (NumObject->new(), NumObject->new()); my $c = $a + $b; my $d = $a->addObjects($b); my $e = NumObject::addObjects($a, $b);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Remove bless reference or class/package name from method arguments
by binf-jw (Monk) on May 20, 2009 at 10:47 UTC |