package ExtUtils::Liblist;
-no warnings 'ambiguous'; # silence the -f() file tests.
-
@ISA = qw(ExtUtils::Liblist::Kid File::Spec);
sub lsdir {
(F) The '!' is allowed in pack() and unpack() only after certain types.
See L<perlfunc/pack>.
-=item Ambiguous -%c() resolved as a file test
-
-(W ambiguous) You used a "-" right in front a call to a subroutine
-that has the same name as a Perl file test (C<r w x o R W X O e z s
-f d l p S u g k b c t T B M A C>).
-
-To disambiguate it as a subroutine call, use either an extra space after
-the "-", C<- f(...)>, or an extra set of parentheses, C<-(f(...))>.
-To disambiguate it as a file test, use an extra space after the operator
-name C<-f (...)>, or add the space and remove the parentheses, C<-f ...>.
-
=item Ambiguous call resolved as CORE::%s(), qualify as such or use &
(W ambiguous) A subroutine you have declared has the same name as a Perl
Ambiguous use of %c resolved as operator %c
*foo *foo
- Ambiguous -f%c call resolved as a file test [yylex]
- sub f { }; -f(0)
-
__END__
# toke.c
use warnings 'deprecated' ;
"@mjd_previously_unused_array";
EXPECT
Possible unintended interpolation of @mjd_previously_unused_array in string at - line 3.
-########
-# toke.c
-use warnings 'ambiguous';
-sub f { 24 }
--f("TEST");
-print - f("TEST");
-print -(f("TEST"));
-print -f ("TEST");
-print -f "TEST";
-sub Q { 42 };
-print -Q();
-EXPECT
-Ambiguous -f() resolved as a file test at - line 4.
-Ambiguous -f() resolved as a file test at - line 7.
--24-2411-42
-
DEBUG_T( { PerlIO_printf(Perl_debug_log,
"### Saw file test %c\n", ftst);
} )
- if (*s == '(' && ckWARN(WARN_AMBIGUOUS))
- Perl_warner(aTHX_ WARN_AMBIGUOUS,
- "Ambiguous -%c() resolved as a file test",
- tmp);
FTST(ftst);
}
else {
/* Assume it was a minus followed by a one-letter named
* subroutine call (or a -bareword), then. */
+ DEBUG_T( { PerlIO_printf(Perl_debug_log,
+ "### %c looked like a file test but was not\n", ftst);
+ } )
s -= 2;
}
}