From: Vincent Pit Date: Mon, 4 Aug 2008 22:47:10 +0000 (+0200) Subject: readline/<> should be seen as returning a list X-Git-Tag: v0.02~14 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Nary.git;a=commitdiff_plain;h=6faf4b78a5c4fdcf2f3d42e3decceb4968ba0347 readline/<> should be seen as returning a list --- diff --git a/lib/Sub/Nary.pm b/lib/Sub/Nary.pm index 5ff0574..0b505f3 100644 --- a/lib/Sub/Nary.pm +++ b/lib/Sub/Nary.pm @@ -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) = @_; diff --git a/t/20-return.t b/t/20-return.t index 3d16d45..fc85334 100644 --- a/t/20-return.t +++ b/t/20-return.t @@ -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; diff --git a/t/21-list.t b/t/21-list.t index c260cd3..9adca6a 100644 --- a/t/21-list.t +++ b/t/21-list.t @@ -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;