go ahead... be a heretic | |
PerlMonks |
Re: perldelta unclear on 'given's fateby tobyink (Canon) |
on Jan 04, 2014 at 17:13 UTC ( [id://1069299]=note: print w/replies, xml ) | Need Help?? |
I imagine that given/when will be kept. However, the perception is that their current implementation is highly flawed. A new implementation will probably break some existing uses of given/when, so it makes sense to start warning people about this. given originally used the lexical $_ rather than the global $_ (but this has changed in 5.18). This was confusing for many people. when adds a whole extra layer of weird. Quick quiz! What does this output?
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|