Skip to content

Fix Test::More non-local last SKIP warning suppression #1482

Description

@fglock

Tags 0.16 fails Test::NoWarnings around non-local last SKIP

Summary

The upstream Tags 0.16 suite passes under system Perl but PerlOnJava fails one test because Test::More::skip() emits an unexpected Exiting subroutine via last warning while executing a non-local last SKIP.

Reproduction

The stable failing test is t/Tags-Output-Raw/09-put-preserve_from_attribute.t, whose skip block uses:

use warnings;
use Test::More tests => 4;
use Test::NoWarnings;

SKIP: {
    skip 'Need check.', 1;
}

Test::More::skip() executes last SKIP under no warnings 'exiting'. Standard Perl suppresses the warning and the test passes.

Results

  • Distribution: Tags 0.16
  • CPAN random-tester run: 20260922-093937-23377
  • System Perl: PASS, 38 files / 196 tests
  • PerlOnJava JVM backend: FAIL, 1 of 196 tests
  • PerlOnJava interpreter backend: FAIL, 1 of 196 tests

The PerlOnJava failure reports:

Exiting subroutine via last at Test/More.pm line 1413

The JVM minimal reproducer may additionally report Label not found for "last SKIP"; the archived distribution run fails through Test::NoWarnings because of the unexpected warning.

This is a PerlOnJava control-flow and warning-suppression compatibility issue, not a Tags implementation failure or native dependency issue.

Acceptance criteria

  • Test::More::skip() suppresses the exiting warning for its intentional non-local last SKIP on both backends.
  • The focused reproducer passes without an unexpected warning.
  • Tags 0.16 t/Tags-Output-Raw/09-put-preserve_from_attribute.t passes on both backends.
  • Add a project-owned, standard-Perl-validated regression test for this behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:backendJVM interpreter or execution-backend behaviorarea:cpan-portCPAN compatibility ports and providersarea:runtimeCore Perl runtime semanticsbugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions