[Koha-bugs] [Bug 8233] New search engine layer - introduce solr without breaking anything else

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 22 15:35:12 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8233

--- Comment #12 from Ian Walls <koha.sekjal at gmail.com> ---
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.


More information about the Koha-bugs mailing list