note
haukex
<pre>
[id://11110663|./Porting/bisect.pl] --target=miniperl --start=v5.16.3 --end=v5.18.0 --expect-fail -e 'sub foo::new {} "::foo"->new'
...
commit [https://github.com/Perl/perl5/commit/7156e69abfd37|7156e69abfd37267e85105c6ec0c449ce4e41523]
Author: Father Chrysostomos <sprout@cpan.org>
Date: Thu Sep 20 08:56:38 2012 -0700
[https://github.com/Perl/perl5/issues/11800|[perl #105922]] Allow any string before ->meth
The rules for filtering out what do not look like package names are
not logical and disallow valid things like "::main", while allowing
q"_#@*$!@*^(".
This commit simply lets any non-empty string be used as a package
name. If it is a typo, you’ll get an error anyway. This allows
autobox-style calls like "3foo"->CORE::uc, or even "3foo"->uc if you
set up @ISA first.
I made an exception for the empty string because it messes up caches
somehow and causes subsequent method calls all to be called on the
main package. I haven’t looked into that yet. I don’t know whether
it’s worth it.
The changes to the tests in cpan/Test-Simple have been submit-
ted upstream.
</pre>
<p>Mentioned in [doc://perl5180delta#Selected-Bug-Fixes|perl5180delta]:</p>
<blockquote>Class method calls are now allowed on any string, and not just strings beginning with an alphanumeric character. [perl #105922]</blockquote>
11121810
11121810