http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8233
--- Comment #12 from Ian Walls <[email protected]> --- Right, I wasn't advocating for Switch itself, so much as supporting the syntactic structure of switch that can be found in many programming languages. Looks like Perl does this most stably (right now) with this structure: for ($var) { when (/^abc/) { $abc = 1 } when (/^def/) { $def = 1 } when (/^xyz/) { $xyz = 1 } default { $nothing = 1 } } and, "highly experimentally", with given ($var) { when (/^abc/) { $abc = 1 } when (/^def/) { $def = 1 } when (/^xyz/) { $xyz = 1 } default { $nothing = 1 } } While I'm sure using given would in most cases be safe, it could very well introduce a difficult-to-trace problem for a non-typical install (where a different Perl version could have snuck in). I'm probably being overly paranoid, but that's what a QAM is for! -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
