Switch
view release on metacpan or search on metacpan
use Carp;
use if $] >= 5.011, 'deprecate';
$VERSION = '2.17';
# LOAD FILTERING MODULE...
use Filter::Util::Call;
sub __();
# CATCH ATTEMPTS TO CALL case OUTSIDE THE SCOPE OF ANY switch
$::_S_W_I_T_C_H = sub { croak "case/when statement not in switch/given block" };
my $offset;
my $fallthrough;
my ($Perl5, $Perl6) = (0,0);
sub import
return 1;
}
sub case($) { local $SIG{__WARN__} = \&carp;
$::_S_W_I_T_C_H->(@_); }
# IMPLEMENT __
my $placeholder = bless { arity=>1, impl=>sub{$_[1+$_[0]]} };
sub __() { $placeholder }
sub __arg($)
{
my $index = $_[0]+1;
bless { arity=>0, impl=>sub{$_[$index]} };
}
sub hosub(&@)
{
# WRITE THIS
( run in 2.538 seconds using v1.01-cache-2.11-cpan-524268b4103 )