]> git.vpit.fr Git - perl/modules/Sub-Nary.git/blobdiff - samples/cx.pl
Fix map/grep handling of returns in block with a new cumulate function
[perl/modules/Sub-Nary.git] / samples / cx.pl
index 0b51a13399eb7c51e3ae63e22693cdf34d2fd44c..69bef742f77521688e7da9e8f88f232822022682 100755 (executable)
@@ -7,6 +7,7 @@ use lib qw{blib/lib blib/arch};
 use B::Deparse;
 use B::Concise;
 use Sub::Nary;
+$Sub::Nary::DEBUG = 1;
 
 my ($x, $y, @z, %h);
 
@@ -42,7 +43,7 @@ sub wut2 {
  } elsif ($y) {
   sub { qr/wat/ }, %h;
  } elsif (@z) {
-  return [ ] 
+  return [ ];
  }
 }
 
@@ -62,7 +63,7 @@ sub ifr {
 }
 
 my $code = \&wut;
-
+$code = sub { while (do { return 2, 3 }) { } };
 my $bd = B::Deparse->new();
 print STDERR $bd->coderef2text($code), "\n";