perl
view release on metacpan or search on metacpan
pod/perldiag.pod view on Meta::CPAN
f()->();
Here, when the '$x' in the eval is being compiled, f() is not currently
being executed, so its $x is not available for capture.
=item Variable "%s" is not imported%s
(S misc) With "use strict" in effect, you referred to a global variable
that you apparently thought was imported from another module, because
something else of the same name (usually a subroutine) is exported by
that module. It usually means you put the wrong funny character on the
front of your variable. It is also possible you used an "our" variable
whose scope has ended.
=item Variable length lookbehind not implemented in regex m/%s/
(F) B<This message no longer should be raised as of Perl 5.30.> It is
retained in this document as a convenience for people using an earlier
Perl version.
In Perl 5.30 and earlier, lookbehind is allowed
only for subexpressions whose length is fixed and
known at compile time. For positive lookbehind, you can use the C<\K>
regex construct as a way to get the equivalent functionality. See
L<(?<=pattern) and \K in perlre|perlre/\K>.
Starting in Perl 5.18, there are non-obvious Unicode rules under C</i>
that can match variably, but which you might not think could. For
example, the substring C<"ss"> can match the single character LATIN
SMALL LETTER SHARP S. Here's a complete list of the current ones
affecting ASCII characters:
ASCII
sequence Matches single letter under /i
FF U+FB00 LATIN SMALL LIGATURE FF
FFI U+FB03 LATIN SMALL LIGATURE FFI
FFL U+FB04 LATIN SMALL LIGATURE FFL
FI U+FB01 LATIN SMALL LIGATURE FI
FL U+FB02 LATIN SMALL LIGATURE FL
SS U+00DF LATIN SMALL LETTER SHARP S
U+1E9E LATIN CAPITAL LETTER SHARP S
ST U+FB06 LATIN SMALL LIGATURE ST
U+FB05 LATIN SMALL LIGATURE LONG S T
This list is subject to change, but is quite unlikely to.
Each ASCII sequence can be any combination of upper- and lowercase.
You can avoid this by using a bracketed character class in the
lookbehind assertion, like
(?<![sS]t)
(?<![fF]f[iI])
This fools Perl into not matching the ligatures.
Another option for Perls starting with 5.16, if you only care about
ASCII matches, is to add the C</aa> modifier to the regex. This will
exclude all these non-obvious matches, thus getting rid of this message.
You can also say
use if $] ge 5.016, re => '/aa';
to apply C</aa> to all regular expressions compiled within its scope.
See L<re>.
=item Variable length positive lookbehind with capturing is experimental in regex m/%s/
(W) Variable length positive lookbehind with capturing is not well defined. This
warning alerts you to the fact that you are using a construct which may
change in a future version of perl. See the
L<< documentation of Positive Lookbehind in perlre|perlre/"C<(?<=I<pattern>)>" >>
for details. You may silence this warning with the following:
no warnings 'experimental::vlb';
=item Variable length negative lookbehind with capturing is experimental in regex m/%s/
(W) Variable length negative lookbehind with capturing is not well defined. This
warning alerts you to the fact that you are using a construct which may
change in a future version of perl. See the
L<< documentation of Negative Lookbehind in perlre|perlre/"C<(?<!I<pattern>)>" >>
for details. You may silence this warning with the following:
no warnings 'experimental::vlb';
=item "%s" variable %s masks earlier declaration in same %s
(W shadow) A "my", "our", "state" or "field" variable has been redeclared in
the current scope or statement, effectively eliminating all access to the
previous instance. This is almost always a typographical error. Note
that the earlier variable will still exist until the end of the scope
or until all closure references to it are destroyed.
=item Variable syntax
(A) You've accidentally run your script through B<csh> instead
of Perl. Check the #! line, or manually feed your script into
Perl yourself.
=item Variable "%s" will not stay shared
(W closure) An inner (nested) I<named> subroutine is referencing a
lexical variable defined in an outer named subroutine.
When the inner subroutine is called, it will see the value of
the outer subroutine's variable as it was before and during the *first*
call to the outer subroutine; in this case, after the first call to the
outer subroutine is complete, the inner and outer subroutines will no
longer share a common value for the variable. In other words, the
variable will no longer be shared.
This problem can usually be solved by making the inner subroutine
anonymous, using the C<sub {}> syntax. When inner anonymous subs that
reference variables in outer subroutines are created, they
are automatically rebound to the current values of such variables.
=item vector argument not supported with alpha versions
(S printf) The %vd (s)printf format does not support version objects
with alpha parts.
( run in 2.765 seconds using v1.01-cache-2.11-cpan-5e09290becf )