Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail with Perl 5.37.10 #69

Closed
jplesnik opened this issue May 31, 2023 · 2 comments
Closed

Tests fail with Perl 5.37.10 #69

jplesnik opened this issue May 31, 2023 · 2 comments

Comments

@jplesnik
Copy link

Tests are failing since Perl 5.37.10.

If you want to see complete log please check CPAN Testers.

Example from log:

given is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 572.
when is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 573.
when is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 576.
Smartmatch is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 741.

#   Failed test 'no warnings'
#   at /usr/share/perl5/Test/Builder.pm line 193.
# There were 24 warning(s)
#     Previous test 0 ''
#     given is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Utils.pm line 237.
#  at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Utils.pm line 237.
# 	require MooseX/App/Utils.pm called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Exporter.pm line 11
# 	MooseX::App::Exporter::BEGIN() called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Exporter.pm line 11
# 	eval {...} called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Exporter.pm line 11
# 	require MooseX/App/Exporter.pm called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App.pm line 14
# 	MooseX::App::BEGIN() called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App.pm line 14
# 	eval {...} called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App.pm line 14
# 	require MooseX/App.pm called at t/testlib/Test01.pm line 4
# 	Test01::BEGIN() called at t/testlib/Test01.pm line 4
# 	eval {...} called at t/testlib/Test01.pm line 4
# 	require Test01.pm called at t/01_basic.t line 11
# 	main::BEGIN() called at t/01_basic.t line 11
# 	eval {...} called at t/01_basic.t line 11
# 
# ----------
ppisar added a commit to ppisar/MooseX-App that referenced this issue Aug 8, 2023
Perl 5.38.0 deprecated smartmatch. New warning messages caused tests
to fail:

    given is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 572.
    when is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 573.
    when is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 576.
    Smartmatch is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 741.

    #   Failed test 'no warnings'
    #   at /usr/share/perl5/Test/Builder.pm line 193.
    # There were 24 warning(s)
    #     Previous test 0 ''
    #     given is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Utils.pm line 237.
    #  at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Utils.pm line 237.
    # 	require MooseX/App/Utils.pm called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Exporter.pm line 11
    # 	MooseX::App::Exporter::BEGIN() called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Exporter.pm line 11
    # 	eval {...} called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Exporter.pm line 11
    # 	require MooseX/App/Exporter.pm called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App.pm line 14
    # 	MooseX::App::BEGIN() called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App.pm line 14
    # 	eval {...} called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App.pm line 14
    # 	require MooseX/App.pm called at t/testlib/Test01.pm line 4
    # 	Test01::BEGIN() called at t/testlib/Test01.pm line 4
    # 	eval {...} called at t/testlib/Test01.pm line 4
    # 	require Test01.pm called at t/01_basic.t line 11
    # 	main::BEGIN() called at t/01_basic.t line 11
    # 	eval {...} called at t/01_basic.t line 11
    #
    # ----------

Since smartmatch will be removed from Perl 5.42, this patch fixes the
test failures by replaceding give, when and ~~ operator with a plain,
old Perl.

<maros#69>
ppisar added a commit to ppisar/MooseX-App that referenced this issue Aug 8, 2023
Perl 5.38.0 deprecated smartmatch. New warning messages caused tests
to fail:

    given is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 572.
    when is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 573.
    when is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 576.
    Smartmatch is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 741.

    #   Failed test 'no warnings'
    #   at /usr/share/perl5/Test/Builder.pm line 193.
    # There were 24 warning(s)
    #     Previous test 0 ''
    #     given is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Utils.pm line 237.
    #  at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Utils.pm line 237.
    # 	require MooseX/App/Utils.pm called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Exporter.pm line 11
    # 	MooseX::App::Exporter::BEGIN() called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Exporter.pm line 11
    # 	eval {...} called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Exporter.pm line 11
    # 	require MooseX/App/Exporter.pm called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App.pm line 14
    # 	MooseX::App::BEGIN() called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App.pm line 14
    # 	eval {...} called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App.pm line 14
    # 	require MooseX/App.pm called at t/testlib/Test01.pm line 4
    # 	Test01::BEGIN() called at t/testlib/Test01.pm line 4
    # 	eval {...} called at t/testlib/Test01.pm line 4
    # 	require Test01.pm called at t/01_basic.t line 11
    # 	main::BEGIN() called at t/01_basic.t line 11
    # 	eval {...} called at t/01_basic.t line 11
    #
    # ----------

Since smartmatch will be removed from Perl 5.42, this patch fixes the
test failures by replacing given, when, and ~~ operator with a plain,
old Perl.

<maros#69>
maros pushed a commit that referenced this issue Oct 21, 2023
Perl 5.38.0 deprecated smartmatch. New warning messages caused tests
to fail:

    given is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 572.
    when is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 573.
    when is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 576.
    Smartmatch is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Meta/Role/Class/Base.pm line 741.

    #   Failed test 'no warnings'
    #   at /usr/share/perl5/Test/Builder.pm line 193.
    # There were 24 warning(s)
    #     Previous test 0 ''
    #     given is deprecated at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Utils.pm line 237.
    #  at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Utils.pm line 237.
    # 	require MooseX/App/Utils.pm called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Exporter.pm line 11
    # 	MooseX::App::Exporter::BEGIN() called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Exporter.pm line 11
    # 	eval {...} called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App/Exporter.pm line 11
    # 	require MooseX/App/Exporter.pm called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App.pm line 14
    # 	MooseX::App::BEGIN() called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App.pm line 14
    # 	eval {...} called at /builddir/build/BUILD/MooseX-App-1.42/blib/lib/MooseX/App.pm line 14
    # 	require MooseX/App.pm called at t/testlib/Test01.pm line 4
    # 	Test01::BEGIN() called at t/testlib/Test01.pm line 4
    # 	eval {...} called at t/testlib/Test01.pm line 4
    # 	require Test01.pm called at t/01_basic.t line 11
    # 	main::BEGIN() called at t/01_basic.t line 11
    # 	eval {...} called at t/01_basic.t line 11
    #
    # ----------

Since smartmatch will be removed from Perl 5.42, this patch fixes the
test failures by replacing given, when, and ~~ operator with a plain,
old Perl.

<#69>
@maros
Copy link
Owner

maros commented Oct 21, 2023

Merged the PR, thank you for the contribution

@maros maros closed this as completed Oct 21, 2023
@maros
Copy link
Owner

maros commented Oct 21, 2023

Released on cpan as 1.43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants