]> git.vpit.fr Git - perl/modules/Sub-Nary.git/blobdiff - lib/Sub/Nary.pm
Add support and tests for eval { }
[perl/modules/Sub-Nary.git] / lib / Sub / Nary.pm
index 3a0b00097b305393648f75290be32933e4d13f78..c44a10e9bf8fb6d73541a8cbb48829b396192403 100644 (file)
@@ -207,6 +207,7 @@ $ops{$_} = 'list' for qw/padany flip match/;
 sub enter {
  my ($self, $cv) = @_;
 
+ return 'list' if class($cv) ne 'CV';
  my $op  = $cv->ROOT;
  my $tag = tag($op);
 
@@ -278,7 +279,7 @@ sub expect_any {
 
  return ($self->expect_list($op))[0] => 1 if name($op) eq 'return';
 
- if (class($op) eq 'LOGOP') {
+ if (class($op) eq 'LOGOP' and not null $op->first) {
   my @res;
   my ($p, $r);