There's more than one way to do things | |
PerlMonks |
Re^3: invoking module functions from a test scriptby bliako (Monsignor) |
on Nov 27, 2019 at 22:24 UTC ( [id://11109333]=note: print w/replies, xml ) | Need Help?? |
if rubber ducks had ears ... (bottom line is: in calling an object's method, $object->method(1,2,3), 1st received param is always the object ref, followed by all other params you called that method with, the 1,2,3. That's not the same when calling a class method "statically", e.g. class::method(1,2,3) -- you get 1,2,3 as params, no object ref this time as there is none.)
In Section
Seekers of Perl Wisdom
|
|