Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re (tilly) 3: Generating similar functions in unrelated objects

by tilly (Archbishop)
on Aug 31, 2001 at 17:54 UTC ( #109383=note: print w/ replies, xml ) Need Help??


in reply to Re: (t'mo) - (tilly) Generating similar functions in unrelated objects
in thread Why I hate File::Find and how I (hope I) fixed it

Are custom imports a good idea?

Can I say it depends?

Most of what I was saying about AUTOLOAD at Re (tilly) 4: Perl and Objects, how do you resolve the two? applies to custom imports as well. A custom import is like a very good sword without a hilt. It can cut really well, but you need to be very cautious before using it.

My rule of thumb is this. If my custom import could be done with Exporter, I don't use it. If it makes for a significantly improved interface and works very differently, then I will consider it. But if I won't actually use it unless I am going to make it a meme in the body of code that I am working on. It doesn't matter how nice each customized rule is, a million and one customized high-level interfaces is unmaintainable.

Or, to put it a different way, It is OK to be clever, but only one person should be being clever at a time.


Comment on Re (tilly) 3: Generating similar functions in unrelated objects
Replies are listed 'Oldest First'.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (13)
As of 2015-07-07 16:33 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 (91 votes), past polls