X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=samples%2Fcx.pl;h=9143830b34219d268e0bbd06992b27496b11c4ba;hb=refs%2Fheads%2Fexitdie;hp=8717d395ea41154cf06f4d477138397d0cfdc975;hpb=3ad0dc082fd7c56afdc76066a7f8c94c4ae28e69;p=perl%2Fmodules%2FSub-Nary.git diff --git a/samples/cx.pl b/samples/cx.pl index 8717d39..9143830 100755 --- a/samples/cx.pl +++ b/samples/cx.pl @@ -4,10 +4,18 @@ use strict; use warnings; use lib qw{blib/lib blib/arch}; -use B::Deparse; + +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; -$Sub::Nary::DEBUG = 1; my ($x, $y, @z, %h); @@ -63,8 +71,7 @@ sub ifr { } my $code = \&wut; - -my $bd = B::Deparse->new(); +$code = sub { for (do { return 1, 2, 3 }) { } return 1, 2; }; print STDERR $bd->coderef2text($code), "\n"; B::Concise::walk_output(\*STDERR);