in reply to Re: "use 5.10.0" creates weird syntax error on sub named "default"
in thread "use 5.10.0" creates weird syntax error on sub named "default"

That must be it ! Thanks, Alexander.

I thought of that feature active only with use Switch 'Perl6'; (http://perldoc.perl.org/5.10.0/Switch.html), but the keyword is obviously reserved all the time.

Still not clear to me why writing explictly use 5.10.0 change the rules of the game, since I'm running 5.10.0 anyway, but allright...

Many thanks again !
  • Comment on Re^2: "use 5.10.0" creates weird syntax error on sub named "default"

Replies are listed 'Best First'.
Re^3: "use 5.10.0" creates weird syntax error on sub named "default"
by ikegami (Patriarch) on Nov 27, 2010 at 09:42 UTC

    I thought of that feature active only with use Switch 'Perl6';

    The experimental Switch module has nothing to do with the built-in switch statement Perl introduced in 5.10.

    but the keyword is obviously reserved all the time.

    Not so. That would have broken backwards compatibility. It's only reserved when use feature qw( switch ); is in use, which is done by use 5.10.0; for you (since you're obviously not worried about backwards compatibility).