X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Nary.git;a=blobdiff_plain;f=samples%2Fcx.pl;h=3289c8dedce3708072a1428b4886764ce0424f6d;hp=0b51a13399eb7c51e3ae63e22693cdf34d2fd44c;hb=HEAD;hpb=4b846088d0ffe4f979b145ec2af821922bd5c7af diff --git a/samples/cx.pl b/samples/cx.pl index 0b51a13..3289c8d 100755 --- a/samples/cx.pl +++ b/samples/cx.pl @@ -3,8 +3,17 @@ use strict; use warnings; -use lib qw{blib/lib blib/arch}; -use B::Deparse; +use lib qw; + +my $bd; +BEGIN { + if (eval "use B::RecDeparse; 1") { + $bd = B::RecDeparse->new; + } else { + use B::Deparse; + $bd = B::Deparse->new; + } +} use B::Concise; use Sub::Nary; @@ -42,7 +51,7 @@ sub wut2 { } elsif ($y) { sub { qr/wat/ }, %h; } elsif (@z) { - return [ ] + return [ ]; } } @@ -63,7 +72,6 @@ sub ifr { my $code = \&wut; -my $bd = B::Deparse->new(); print STDERR $bd->coderef2text($code), "\n"; B::Concise::walk_output(\*STDERR);