diff -ur HOP-Parser-0.01/lib/HOP/Parser.pm HOP-Parser-0.01.new/lib/HOP/Parser.pm --- HOP-Parser-0.01/lib/HOP/Parser.pm 2005-10-28 20:19:15.000000000 -0400 +++ HOP-Parser-0.01.new/lib/HOP/Parser.pm 2008-07-03 08:21:56.000000000 -0400 @@ -4,7 +4,7 @@ use strict; use base 'Exporter'; -use HOP::Stream qw/drop tail head/; +use HOP::Stream qw/drop tail head node/; our %N; @@ -211,6 +211,8 @@ $wanted = [$wanted] unless ref $wanted; my $parser = parser { my $input = shift; + $input = node(@$input) if ref($input) eq 'ARRAY'; + unless ( defined $input ) { die [ 'TOKEN', $input, $wanted ]; } @@ -231,7 +233,8 @@ # Otherwise, the AoA stream might just return an aref for # the tail instead of an AoA. This breaks things my $tail = tail($input); - if ( 'ARRAY' eq ref $tail && 'ARRAY' ne ref $tail->[0] ) { + if ( ('HOP::Stream' eq ref $tail && 'HOP::Stream' ne ref $tail->[0]) || + ('ARRAY' eq ref $tail && 'ARRAY' ne ref $tail->[0]) ) { $tail = [$tail]; } return ( $wanted_value, $tail ); Only in HOP-Parser-0.01.new/lib/HOP: .Parser.pm.swp