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

Better patch for smartmatch deprecation. #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mschout
Copy link

@mschout mschout commented Aug 6, 2023

This patch silences the 'deprecated::smartmatch' warning on perl 5.38.0, and if perl version is 5.42.0 or later, smartmatch is not used at all. This should more gracefully handle the smartmatch deprecation as user code relying on junction matching that uses smartmatch will still get a depreaction warning starting in 5.38.0, but older perls will not be impacted. On 5.38.0 or later, no deprecation warning will be issued unless actual calling code relies on smartmatch.

TL;DR: this patch fixes the deprecated warning on 5.38.0 for code that doesn't actually rely on smartmatch, and when smartmatch is removed (scheduled for 5.42.0 according to perldiag), then smartmatch support will automatically be removed from this module.

This patch silences the 'deprecated::smartmatch' warning on perl 5.38.0,
and if perl version is 5.42.0 or later, smartmatch is not used at all.
This should more gracefully handle the smartmatch deprecation as user
code relying on junction matching that uses smartmatch will still get a
depreaction warning starting in 5.38.0, but older perls will not be
impacted.  On 5.38.0 or later, no deprecation warning will be issued
unless actual calling code relies on smartmatch.
@mschout mschout mentioned this pull request Aug 6, 2023
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

Successfully merging this pull request may close these issues.

None yet

1 participant