in reply to Extremely weird module issue...

Switch.pm is infamous for breaking code in such bizarre ways. Just stop using it. This is exactly why most source filters are a bad idea.

Although the Switch docs are not nearly alarmist enough, it helps to read Damian's own warnings from another module, Perl6::Rules:

via a source filter. (And hence suffers from all the usual limitations of a source filter, including the ability to translate complex code spectacularly wrongly).

Not that I find your code above particularly complex, but I'm not surprised that it is complex enough to cause Switch.pm to bungle things in confusing ways.

- tye        

  • Comment on Re: Extremely weird module issue... (just say no)