diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-09-20 08:56:38 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-09-20 09:49:33 -0700 |
commit | 7156e69abfd37267e85105c6ec0c449ce4e41523 (patch) | |
tree | 51de5000188aa344191f2d0e602b4c16d382a809 /cpan/Test-Simple | |
parent | daef195c35291c889b77ed7da9fc76644092aa45 (diff) | |
download | perl-7156e69abfd37267e85105c6ec0c449ce4e41523.tar.gz |
[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.
Diffstat (limited to 'cpan/Test-Simple')
-rw-r--r-- | cpan/Test-Simple/t/fail-more.t | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpan/Test-Simple/t/fail-more.t b/cpan/Test-Simple/t/fail-more.t index 0fc6a718f5..72b5a518cc 100644 --- a/cpan/Test-Simple/t/fail-more.t +++ b/cpan/Test-Simple/t/fail-more.t @@ -248,22 +248,22 @@ ERR #line 248 isa_ok(42, "Wibble", "My Wibble"); -out_ok( <<OUT, <<ERR ); +out_like( <<OUT, <<ERR ); not ok - My Wibble isa Wibble OUT # Failed test 'My Wibble isa Wibble' # at $0 line 248. -# My Wibble isn't a class or reference +# My Wibble isn't a .* ERR #line 248 isa_ok(42, "Wibble"); -out_ok( <<OUT, <<ERR ); -not ok - The thing isa Wibble +out_like( <<OUT, <<ERR ); +not ok - The (thing|class) isa Wibble OUT -# Failed test 'The thing isa Wibble' +# Failed test 'The (thing|class) isa Wibble' # at $0 line 248. -# The thing isn't a class or reference +# The (thing|class) isn't a .* ERR #line 258 |