]> git.vpit.fr Git - perl/modules/Sub-Nary.git/commitdiff
readline/<> should be seen as returning a list
authorVincent Pit <vince@profvince.com>
Mon, 4 Aug 2008 22:47:10 +0000 (00:47 +0200)
committerVincent Pit <vince@profvince.com>
Mon, 4 Aug 2008 22:47:10 +0000 (00:47 +0200)
lib/Sub/Nary.pm
t/20-return.t
t/21-list.t

index 5ff05745418108e0f388d291a7ccf046ec9bc75e..0b505f3dc8a99415ac077b044092e598fcdae80d 100644 (file)
@@ -202,7 +202,7 @@ $ops{$_} = 0      for qw/stub nextstate/;
 $ops{$_} = 1      for qw/padsv/;
 $ops{$_} = 'list' for qw/padav/;
 $ops{$_} = 'list' for qw/padhv rv2hv/;
-$ops{$_} = 'list' for qw/padany flip match entereval/;
+$ops{$_} = 'list' for qw/padany flip match entereval readline/;
 
 sub enter {
  my ($self, $cv) = @_;
index 3d16d45ec24c8eff0190203e4fc39fe7607c0abc..fc85334a5a10ff85040ce3a4be3a3507e10de642 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 48;
+use Test::More tests => 49;
 
 use Sub::Nary;
 
@@ -70,6 +70,8 @@ my @tests = (
  [ sub { return eval { do { eval { @a } } } },      'list' ],
 
  [ sub { eval 'return 1, 2' }, 'list' ],
+
+ [ sub { return <$x> }, 'list' ],
 );
 
 my $i = 1;
index c260cd3edffe652400efb0c59a68bb4476b94c7b..9adca6aff7a54db2fbeb63836c0ceb31a5b37dae 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 34;
+use Test::More tests => 35;
 
 use Sub::Nary;
 
@@ -58,6 +58,8 @@ my @tests = (
  [ sub { eval { 1, do { eval { @a }, 2 } } }, 'list' ],
 
  [ sub { eval '1, 2' }, 'list' ],
+
+ [ sub { <$x> }, 'list' ],
 );
 
 my $i = 1;