Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Why do I need 'use 5.010;' ahen I am running '5.24'

by dsheroh (Monsignor)
on Jul 02, 2017 at 09:13 UTC ( [id://1194034]=note: print w/replies, xml ) Need Help??


in reply to Why do I need 'use 5.010;' ahen I am running '5.24'

To answer the part of your question that hasn't been addressed ("Why do I even need to do this at all? Why doesn't it just use all available features by default?"): Backwards compatibility.

Imagine, if you will, a Perl programmer working in the Dark Ages of Perl 5.008. Perhaps this programmer was working with, oh, I don't know, speech synthesis, and wrote a sub say which takes a string and sends it to the text-to-speech engine. If we take this perfectly good Perl 5.008 code and run it on 5.24 in the real world, it will probably Just Work™ without modification. In an alternate reality where 5.24 enables all of the 5.10-and-later features by default, however, we run into an immediate conflict between the programmer's sub say and the built-in say keyword, which will almost certainly break something, if it runs at all.

Replies are listed 'Best First'.
Re^2: Why do I need 'use 5.010;' ahen I am running '5.24'
by marto (Cardinal) on Jul 02, 2017 at 09:18 UTC

    "To answer the part of your question that hasn't been addressed ("Why do I even need to do this at all? Why doesn't it just use all available features by default?"): Backwards compatibility."

    It has been addressed, it's discussed in feature linked to in first reply, and expanded upon in others.

      Nonetheless, it hadn't been previously addressed in this topic on this site, only in linked documents, where it is not visible to someone reading only this discussion. Please forgive my imprecision in omitting the limiting clause.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-19 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found