Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^5: Trying to make perl suck less again

by eserte (Deacon)
on Dec 23, 2007 at 10:49 UTC ( #658764=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Trying to make perl suck less again
in thread Trying to make perl suck less again

Thinking again of my suggestion, a dummy module is here not the way to go. The problem is that "use feature" usually introduces new syntax, and there's no way to make this working in older perls (other than using a source filter, shudder).

If somebody wants to use the new 5.10.0 and remain backwards-compatible, then probably it's best to have the code in two files and have a:

if ($] >= 5.010) { require "new_style.pm"; } else { require "old_style.pm"; }
Which means duplication of code. I think this is only useful if the new features have significant advantages like better performance.


Comment on Re^5: Trying to make perl suck less again
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2015-08-04 08:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (62 votes), past polls