mojo icon indicating copy to clipboard operation
mojo copied to clipboard

Old package separator "'" deprecated at (eval 68) line 1.

Open mtelka opened this issue 2 years ago • 3 comments

  • Mojolicious version: 9.33
  • Perl version: 5.38.0
  • Operating system: OpenIndiana Hipster

Steps to reproduce the behavior

Run Mojolicious tests

Expected behavior

...
t/mojo/json_xs.t ........................... skipped: Cpanel::JSON::XS 4.09+ required for this test!
t/mojo/loader.t ............................ ok
...

The above is with Perl 5.36.1

Actual behavior

...
t/mojo/json_xs.t ........................... skipped: Cpanel::JSON::XS 4.09+ required for this test!
Old package separator "'" deprecated at (eval 68) line 1.
t/mojo/loader.t ............................ ok
...

mtelka avatar Jul 11 '23 09:07 mtelka

So, what should we do about it? Just remove the feature from Mojolicious?

kraih avatar Jul 11 '23 11:07 kraih

No idea. I just noticed a change in test results between Perl 5.36 and Perl 5.38 so I reported it. If this is not a bug in Mojolicious or its tests then please close this bug report.

mtelka avatar Jul 11 '23 11:07 mtelka

The issue is still present in Mojolicious 9.37.

mtelka avatar May 14 '24 09:05 mtelka

Mojolicious tests (t/mojo/base.t, t/mojo/loader.t) have started failing in blead perl / v5.41.3 because the use of ' as a package separator (previously deprecated in v5.38.0) has been removed.

The test in t/mojo/base.t specifically tests for ' support:

use Mojo::Base "Mojo'BaseTestTest";

This should probably be changed to something like

use Mojo::Base $^V ge v5.38.0 ? "Mojo::BaseTestTest" : "Mojo'BaseTestTest";

(assuming you do want to keep testing ' on older perls).

The other error is in t/mojo/loader.t:

  ok !load_class("Mojo'LoaderTest::A"), 'loaded successfully';

This should similarly be changed to "Mojo::LoaderTest::A" or made conditional with a version check.

See also: https://github.com/Perl/perl5/issues/22504

mauke avatar Aug 13 '24 04:08 mauke