]> git.vpit.fr Git - perl/modules/Sub-Nary.git/blobdiff - samples/cx.pl
Update VPIT::TestHelpers to 15e8aee3
[perl/modules/Sub-Nary.git] / samples / cx.pl
index 0b51a13399eb7c51e3ae63e22693cdf34d2fd44c..3289c8dedce3708072a1428b4886764ce0424f6d 100755 (executable)
@@ -3,8 +3,17 @@
 use strict;
 use warnings;
 
-use lib qw{blib/lib blib/arch};
-use B::Deparse;
+use lib qw<blib/lib blib/arch>;
+
+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);