Lines Matching defs:Switch

1 package Switch;
48 local $Switch::file = (caller)[1];
95 if ($source =~ m/(\G\s*use\s+Switch\b)/gc)
97 $text .= q{use Switch 'noimport'};
128 die "Bad $keyword statement (problem in the parentheses?) near $Switch::file line ", line(substr($source,0,pos $source),$line), "\n";
138 die "Bad $keyword statement (problem in the code block?) near $Switch::file line ", line(substr($source,0, pos $source), $line), "\n";
141 $code =~ s/{/{ local \$::_S_W_I_T_C_H; Switch::switch $arg;/;
152 : "if (Switch::case");
195 die "Bad $keyword statement (invalid $keyword value?) near $Switch::file line ", line(substr($source,0,pos $source), $line), "\n";
198 die "Missing opening brace or semi-colon after 'when' value near $Switch::file line ", line(substr($source,0,pos $source), $line), "\n"
207 die "Bad $keyword statement (problem in the code block?) near $Switch::file line ", line(substr($source,0,pos $source),$line), "\n";
282 return $c_val->call($s_val) if $c_ref eq 'Switch';
298 return $c_val->call($s_val) if $c_ref eq 'Switch';
315 if $c_ref eq 'Switch';
332 return $c_val->call($s_val) if $c_ref eq 'Switch';
348 return $c_val->call($s_val) if $c_ref eq 'Switch';
355 elsif ($s_ref eq 'Switch')
359 return $s_val == $c_val if ref $c_val eq 'Switch';
406 my $rop = ref $right eq 'Switch'
410 my $lop = ref $left eq 'Switch'
433 my $lop = ref $left eq 'Switch'
501 Switch - A switch statement for Perl
505 This document describes version 2.10 of Switch,
510 use Switch;
542 Switch Case Type of Match Implied Matching Code
600 The Switch.pm module implements a generalized case mechanism that covers
634 use Switch;
736 use Switch 'fallthrough';
754 same semantics as those offered by Switch.pm, but with a different
759 This future syntax is also (largely) available via the Switch.pm module, by
762 use Switch 'Perl6';
779 use Switch 'Perl5', 'Perl6';
802 overcome this, when importing Switch.pm, a special "placeholder"
807 use Switch '__';
863 Due to the heuristic nature of Switch.pm's source parsing, the presence
867 Due to the way source filters work in Perl, you can't use Switch inside