]> git.vpit.fr Git - perl/modules/Sub-Nary.git/blobdiff - lib/Sub/Nary.pm
Return 'list' when we can't enter the coderef (such as calling non-overriden core...
[perl/modules/Sub-Nary.git] / lib / Sub / Nary.pm
index f408f8c50ff5fdd31d42ab622e401c8a8b4cf329..f2b53439d92c0bf7fbff1398c0ab7651dc4eaf38 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);
 
@@ -304,7 +305,7 @@ sub expect_any {
  return $self->expect_list($op);
 }
 
-# Stolen from Sub::Deparse
+# Stolen from B::Deparse
 
 sub padval { $_[0]->{cv}->[0]->PADLIST->ARRAYelt(1)->ARRAYelt($_[1]) }