package: perl-modules
version: 5.8.8-2

== perl-switch-bug.pl
#!/usr/bin/perl -w

use strict;
use warnings;

use Switch;

sub foo($) {
#sub foo {
        switch ( "a" ) {
                case "a" { }
        }
}
==
perl perl-switch-bug.pm
String found where operator expected at perl-switch-bug.pl line 11, near "case 
"a""
        (Do you need to predeclare case?)
syntax error at perl-switch-bug.pl line 10, near ") {"
syntax error at perl-switch-bug.pl line 12, near "}"
Execution of perl-switch-bug.pl aborted due to compilation errors.
==
If you use the other 'sub foo' line, then you get no error.

It appears that either Switch.pm doesn't work with subrouting prototypes, or
source filtering is broken for that.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to