The problem is that Switch.pm is a source filter, which is effectively an extra level of processing before compilation.
Personally, I wouldn't use a source filter for anything I cared about.
The docs for Switch state:
There are undoubtedly serious bugs lurking somewhere in code this funky :-)
and also
Due to the heuristic nature of Switch.pm's source parsing, the presence of regexes specified with raw "?...?" delimiters may cause mysterious errors.
I haven't spent the time to verify the exact cause, but I think I have had trouble with the compiler giving me incorrect line numbers for errors, when I've used Switch. I don't know if it was an isolated couple of cases or if this a common problem with the module, but it has turned me off to it.
I am looking forward to the native switch in Perl 6 though.
James
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>