remove dead backwards compatibility code - #83
Open
mauke wants to merge 6 commits into
Open
Conversation
pmqs
reviewed
Aug 13, 2026
| unless $ENV{PERL_CORE}; | ||
|
|
||
| (my $mm_version = ExtUtils::MakeMaker->VERSION) =~ tr/_//d; | ||
|
|
Owner
There was a problem hiding this comment.
This needs a short comment explaining what it is doing.
pmqs
reviewed
Aug 13, 2026
pmqs
reviewed
Aug 13, 2026
pmqs
reviewed
Aug 13, 2026
pmqs
reviewed
Aug 13, 2026
pmqs
reviewed
Aug 13, 2026
pmqs
reviewed
Aug 13, 2026
pmqs
reviewed
Aug 13, 2026
|
|
||
| package IO::Uncompress::Gunzip ; | ||
|
|
||
| require 5.006 ; |
Owner
There was a problem hiding this comment.
probably needs to be requite 5.008 here and in all other files.
Author
There was a problem hiding this comment.
If you want to raise the minimum supported perl version to 5.8.0, that's fine with me, but I don't think it should be part of this pull request.
`ExtUtils::MakeMaker->VERSION() gt '6.30'` is a string comparison. It will return wrong results if ExtUtils::MakeMaker reaches version 10. Use a numeric comparison instead (but explicitly strip out "_" because old ExtUtils::MakeMaker versions include a literal "_" in their version "numbers").
We don't need any fancy tests involving $^O, $], or eval() because both branches of the conditional return 1. So just set $needBinmode to 1.
`$] < 5.6` has always been true because a `$]` number of 5.6 represents perl v5.600.0, which is not expected to be released within the next hundred years. These tests probably intended to check for `$] < 5.006`, but that's pointless because they also `use warnings`, which is a compile-time error on perls before v5.6.0.
It makes more sense to print the perl version instead of a literal `$]`.
The file starts with `require 5.006`, so `$]` cannot be less than 5.006 at this point.
All of these files `use warnings`, which is a compile-time error on perls before v5.6.0. Subsequent runtime tests such as `if ($] < 5.006)` or `require 5.006` are thus redundant.
mauke
force-pushed
the
remove-dead-compat-code
branch
from
August 15, 2026 12:51
bdf999f to
97d8c31
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most of this patch is dead code removal. If a file uses
use warnings, which is a compile-time error on perls before v5.6.0, any subsequent runtime tests such asif ($] < 5.006)orrequire 5.006are redundant: A perl that would fail these checks wouldn't have made it this far into the file anyway.Plus a few bug fixes:
10.0lt5.99)$]in skip message; don't print it literally$] < 5.6should have been$] < 5.006