Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Why doesn't "my ($x) = @);" generate a syntax error?

by tobyink (Abbot)
on Jun 13, 2013 at 23:31 UTC ( #1038863=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Why doesn't "my ($x) = @);" generate a syntax error?
in thread Why doesn't "my ($x) = @);" generate a syntax error?

$[, @[ and %[ work (or at least they do in 5.18.0). If ${, @{ and %{ were to work, that would break dereferencing.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name


Comment on Re^3: Why doesn't "my ($x) = @);" generate a syntax error?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2014-12-23 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (133 votes), past polls