Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How to write a Mixin without Exporter mess?

by JavaFan (Canon)
on Jul 06, 2009 at 22:37 UTC ( #777701=note: print w/ replies, xml ) Need Help??


in reply to How to write a Mixin without Exporter mess?

Considering that Perl doesn't have private methods, the breaking of encapsulation happens the moment you decide to call a sub as a module which should be hidden. After all, if it's hidden, you certainly don't want it to be masked, whether intentionally, or by accident; therefore, there is no reason to call frobnerize as a method. In fact, calling it as a sub is wrong, given your constraints. Call it as a sub - after all, you want it to act as a sub.


Comment on Re: How to write a Mixin without Exporter mess?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2015-07-08 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls