diff --git a/src/main/java/org/perlonjava/parser/Parser.java b/src/main/java/org/perlonjava/parser/Parser.java index aa7b699e..fc9ae404 100644 --- a/src/main/java/org/perlonjava/parser/Parser.java +++ b/src/main/java/org/perlonjava/parser/Parser.java @@ -942,7 +942,10 @@ public boolean looksLikeEmptyList() { } else if (INFIX_OP.contains(token.text) || token.text.equals(",")) { // tokenIndex++; ctx.logDebug("parseZeroOrMoreList infix `" + token.text + "` followed by `" + nextToken.text + "`"); - if (token.text.equals("%") && (nextToken.text.equals("$") || nextToken.type == LexerTokenType.IDENTIFIER)) { + if (token.text.equals("&")) { + // looks like a subroutine call, not an infix `&` + ctx.logDebug("parseZeroOrMoreList looks like subroutine call"); + } else if (token.text.equals("%") && (nextToken.text.equals("$") || nextToken.type == LexerTokenType.IDENTIFIER)) { // looks like a hash deref, not an infix `%` ctx.logDebug("parseZeroOrMoreList looks like Hash"); } else if (token.text.equals(".") && token1.type == LexerTokenType.NUMBER) { diff --git a/src/main/perl/lib/Test/More.pm b/src/main/perl/lib/Test/More.pm index e90ba2d8..578221fd 100644 --- a/src/main/perl/lib/Test/More.pm +++ b/src/main/perl/lib/Test/More.pm @@ -3,6 +3,7 @@ package Test::More; use strict; use warnings; use Exporter 'import'; +use Symbol 'qualify_to_ref'; our @EXPORT = qw( plan ok is isnt like unlike cmp_ok can_ok isa_ok @@ -13,6 +14,16 @@ my $Test_Count = 0; my $Plan_Count; my $Failed_Count = 0; +# sub import { +# my $package = shift; +# my $caller = caller; +# +# for my $symbol (@EXPORT) { +# my $full_name = qualify_to_ref($symbol, $caller); +# *$full_name = \&{$symbol}; +# } +# } + sub plan { my ($directive, $arg) = @_; if ($directive eq 'tests') {