in reply to "use 5.10.0" creates weird syntax error on sub named "default"
Just FYI and not really apropos of much, ::default() works as well and avoids possible &-ish complications:
>perl -wMstrict -le "use 5.10.0; ::default(); sub default { print 'works' } given ('x') { when ('y') { print 'y' } default { print 'default' } } " works default
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "use 5.10.0" creates weird syntax error on sub named "default"
by chromatic (Archbishop) on Nov 28, 2010 at 01:36 UTC |