Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re^3: Procedural vs OOP modules
in thread Procedural vs OOP modules

> 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
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11138212]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-20 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found