Syntax-Operator-Identical
view release on metacpan or search on metacpan
t/12deparse.t view on Meta::CPAN
{
my ( $sub, $exp, $name ) = @_;
my $got = $deparser->coderef2text( $sub );
# Deparsed output is '{ ... }'-wrapped
$got = ( $got =~ m/^{\n(.*)\n}$/s )[0];
# Deparsed output will have a lot of pragmata and so on; just grab the
# final line
$got = ( split m/\n/, $got )[-1];
$got =~ s/^\s+//;
is( $got, $exp, $name );
}
is_deparsed
sub { is_identical $_[0], $_[1] },
'Syntax::Operator::Identical::is_identical($_[0], $_[1]);',
'is_identical';
( run in 0.656 second using v1.01-cache-2.11-cpan-5511b514fd6 )