Source filters need to parse Perl code. That's very hard to do correctly for a given version of Perl, and it's even harder to do for all versions of Perl. There's even a saying concerning this: "Only
perl can parse Perl." For example, I notice
Switch uses
Text::Balanced, which is falls apart when given
split(//, $var). (Use
$var =~ /(.)/g instead.) I've heard of other bugs in Text::Balanced.