Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: Make $^V and "my" implicit

by tobyink (Canon)
on Feb 04, 2014 at 15:27 UTC ( [id://1073418]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Make $^V and "my" implicit
in thread Make $^V and "my" implicit

Generally speaking, you don't need to manually enable new features. Recent features like the defined-or operator (// and //=), and s///r, and the package NAME BLOCK syntax, and so on, work out of the box in new versions of Perl. You don't need to explicitly enable them.

The exception to this rule is for things like state, say, fc, and so on, which before becoming new Perl features, were already syntactically correct Perl. Thus people could have been using functions with these names already. Enabling them implicitly would break existing Perl scripts, thus they need to be enabled explicitly.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-26 02:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found