Switcheroo
view release on metacpan or search on metacpan
- Document usage of Switcheroo with Smart::Match.
- Document usage of Switcheroo with Types::Standard.
[ Test Suite ]
- Test cases for using Switcheroo with Smart::Match.
- Test cases for using Switcheroo with Types::Standard.
[ Other ]
- Drop dependency on Devel::Caller - there are other methods to access
your caller's @_ array which are no more unreliable.
- Drop dependency on Devel::LexAlias - allow PadWalker to do it all!
0.007 2013-10-10 Bond, James Bond
[ Test Suite ]
- More test cases for using @_ within switch blocks.
- Test cases for closing over variables.
[ Other ]
- Improve support for using @_ within switch blocks.
}
},
"develop" : {
"recommends" : {
"Dist::Inkt" : "0.001"
}
},
"runtime" : {
"requires" : {
"Exporter::Tiny" : "0.026",
"PadWalker" : "0",
"Parse::Keyword" : "0.06",
"match::simple" : "0.004",
"perl" : "5.014"
}
},
"test" : {
"recommends" : {
"Smart::Match" : "0.007",
"Types::Standard" : "0.001"
},
- inc
- t
- xt
optional_features: {}
provides:
Switcheroo:
file: lib/Switcheroo.pm
version: 0.008
requires:
Exporter::Tiny: 0.026
PadWalker: 0
Parse::Keyword: 0.06
match::simple: 0.004
perl: 5.014
resources:
X_identifier: http://purl.org/NET/cpan-uri/dist/Switcheroo/project
bugtracker: http://rt.cpan.org/Dist/Display.html?Queue=Switcheroo
homepage: https://metacpan.org/release/Switcheroo
license: http://dev.perl.org/licenses/
repository: https://github.com/tobyink/p5-switcheroo
version: 0.008
Makefile.PL view on Meta::CPAN
},
"name" => "Switcheroo",
"no_index" => { directory => ["eg", "examples", "inc", "t", "xt"] },
"prereqs" => {
configure => { requires => { "ExtUtils::MakeMaker" => 6.17 } },
develop => { recommends => { "Dist::Inkt" => 0.001 } },
runtime => {
requires => {
"Exporter::Tiny" => 0.026,
"match::simple" => 0.004,
"PadWalker" => 0,
"Parse::Keyword" => 0.06,
"perl" => 5.014,
},
},
test => {
recommends => { "Smart::Match" => 0.007, "Types::Standard" => 0.001 },
requires => { "Test::More" => 0.96, "Test::Requires" => 0.06 },
},
},
"provides" => { Switcheroo => { file => "lib/Switcheroo.pm", version => 0.008 } },
dc:title "the same terms as the perl 5 programming language system itself".
<http://purl.org/NET/cpan-uri/dist/Switcheroo/project>
a doap:Project;
dc:contributor <http://purl.org/NET/cpan-uri/person/tobyink>;
doap-deps:develop-recommendation [ doap-deps:on "Dist::Inkt 0.001"^^doap-deps:CpanId ];
doap-deps:runtime-requirement [ doap-deps:on "perl 5.014"^^doap-deps:CpanId ], [
doap-deps:on "Exporter::Tiny 0.026"^^doap-deps:CpanId;
], [
doap-deps:on "match::simple 0.004"^^doap-deps:CpanId;
], [ doap-deps:on "PadWalker"^^doap-deps:CpanId ], [
doap-deps:on "Parse::Keyword 0.06"^^doap-deps:CpanId;
];
doap-deps:test-recommendation [
doap-deps:on "Types::Standard 0.001"^^doap-deps:CpanId;
], [ doap-deps:on "Smart::Match 0.007"^^doap-deps:CpanId ];
doap-deps:test-requirement [ doap-deps:on "Test::More 0.96"^^doap-deps:CpanId ], [
doap-deps:on "Test::Requires 0.06"^^doap-deps:CpanId;
];
doap:bug-database <http://rt.cpan.org/Dist/Display.html?Queue=Switcheroo>;
doap:created "2013-09-01"^^xsd:date;
a doap-changeset:Documentation;
rdfs:label "Document usage of Switcheroo with Types::Standard.";
], [
a doap-changeset:Tests;
rdfs:label "Test cases for using Switcheroo with Smart::Match.";
], [
a doap-changeset:Tests;
rdfs:label "Test cases for using Switcheroo with Types::Standard.";
], [
a doap-changeset:Change;
rdfs:label "Drop dependency on Devel::LexAlias - allow PadWalker to do it all!";
], [
a doap-changeset:Change;
rdfs:label "Drop dependency on Devel::Caller - there are other methods to access your caller's @_ array which are no more unreliable.";
];
];
doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/tobyink>;
doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/Switcheroo-0.008.tar.gz>;
doap:revision "0.008"^^xsd:string.
<http://purl.org/NET/cpan-uri/person/tobyink>
lib/Switcheroo.pm view on Meta::CPAN
package Switcheroo;
our $AUTHORITY = 'cpan:TOBYINK';
our $VERSION = '0.008';
our @EXPORT = qw( switch );
our @EXPORT_OK = qw( match );
our @ISA = qw( Exporter::Tiny );
use Exporter::Tiny qw( );
use match::simple qw( match );
use PadWalker qw( peek_my set_closed_over );
use Parse::Keyword { switch => \&_parse_switch };
sub import
{
my $pkg = caller;
eval qq[ package $pkg; our \$a; our \$b; ];
goto \&Exporter::Tiny::import;
}
sub switch
( run in 0.910 second using v1.01-cache-2.11-cpan-05444aca049 )