Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^5: I know what I mean. Why don't you?

by bigmacbear (Monk)
on May 20, 2006 at 00:31 UTC ( #550624=note: print w/ replies, xml ) Need Help??


in reply to Re^4: I know what I mean. Why don't you?
in thread I know what I mean. Why don't you?

Global filehandles and two-argument open are additional red flags.

True, unless one is writing scripts that must run on older systems which came with perl 5.005_03 and can't be upgraded in a timely manner. There's still a lot of Solaris 8 out in the wild to which this applies.


Comment on Re^5: I know what I mean. Why don't you?
Replies are listed 'Best First'.
Re^6: I know what I mean. Why don't you?
by Aristotle (Chancellor) on May 20, 2006 at 06:34 UTC

    You can use Symbol::gensym on such old perls to get lexical filehandles (more awkward, but gets you the same benefits), and you could write a conditionally installed wrapper to emulate three-arg open (only awkward once, but only worthwhile when you can foresee value in making the code easily forward-upgradable). Whether the effort is justified will depend on your particular circumstances, of course (but see also my signature).

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (13)
As of 2015-07-07 22:40 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 (93 votes), past polls