Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^4: Procedural vs OOP modules (namespace::clean)by LanX (Saint) |
on Oct 29, 2021 at 14:03 UTC ( [id://11138212]=note: print w/replies, xml ) | Need Help?? |
> Do you suggest that there is no use-case for staticfunc(), No I ask for use-cases justifying to deviate from Class->method() as default. Anything goes in Perl, but I'd like to know why a pattern was applied. I remember the Moo(se) folks using namespace::clean to wipe out any subs which are not part of the class, because otherwise they could be called as instance methods via the ISA chain. A Class->method() OTOH is capable to handle that case by checking if the first parameter $_[0] was blessed.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|