match-simple-XS
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
url => "git://github.com/tobyink/p5-match-simple-xs.git",
web => "https://github.com/tobyink/p5-match-simple-xs",
},
x_identifier => "http://purl.org/NET/cpan-uri/dist/match-simple-XS/project",
},
"version" => 0.002,
};
my %dynamic_config;
do {
if ( $] lt '5.010' ) {
$meta->{prereqs}{runtime}{requires}{'MRO::Compat'} = '0';
}
# Probably a lot of the following is cargo cult.
# My XS-fu is not strong.
#
$dynamic_config{LIBS} = [''];
$dynamic_config{DEFINE} = '';
$dynamic_config{INC} = '-I.';
t/02simple.t view on Meta::CPAN
my $obj2 = do {
package Local::SomeOtherClass;
sub MATCH { $_[1] }
bless [];
};
does_match(1, $obj2);
doesnt_match(0, $obj2);
# If the right hand side is an object which overloads "~~", then a
# true smart match is performed.
if ( $] le '5.036000' ) {
my $obj3 = eval q{
no warnings;
no strict 'refs';
package Local::YetAnotherClass;
use overload q[~~] => sub { $_[1] }, fallback => 1;
bless [];
};
my $e = $@;
ok($obj3, 'eval worked') or diag($e);
does_match(1, $obj3);
( run in 0.369 second using v1.01-cache-2.11-cpan-94b05bcf43c )