Closed bessarabov closed 3 weeks ago
This bug is annoying, right
Downgrading podlators
to 4.14 restores the old behaviour.
I think this is the same issue: https://github.com/rra/podlators/issues/25
Found a simpler workaround than downgrading: add use PerlIO;
to your code.
This is because Pod::Text
code does this:
eval {
my @options = (output => 1, details => 1);
my $flag = (PerlIO::get_layers ($$self{output_fh}, @options))[-1];
if ($flag && ($flag & PerlIO::F_UTF8 ())) {
$$self{ENCODE} = 0;
}
};
which throws a quietly discarded exception: Undefined subroutine &PerlIO::F_UTF8 called at /home/xenu/git/podlators/blib/lib/Pod/Text.pm line 368.
@xenu Huge thank you for investigating this issue!
You are absolutely right — in perl 5.38 there is a change:
podlators has been upgraded from version 4.14 to 5.01
(this is the quote from https://perldoc.perl.org/5.38.0/perldelta )
My issue is completly solved, I've updated the base images that I use for 5.38. I'm using images based on 2 official perl docker images, here are the fragments of my Dockerfile
's with the main things:
FROM perl:5.38.2-bullseye
RUN cpanm Pod::Man@4.14
# ... all other docker steps
FROM perl:5.38.2
RUN cpanm Pod::Man@4.14
# ... all other docker steps
For me the problem is solved, but I'm not sure that I should do with this GitHub issue.
Probably I can close it right now, or probably it should be closed only when there are official perl docker images that don't have such problem (it can be achieved by using versions 4.14, or waiting for the new Pod::Man version that fix this issue; quite possible that this will be addressed in https://github.com/rra/podlators/issues/25 )
Bisection confirms that this problem entered the Perl 5 core distribution with this commit in December 2022:
commit 20616d517ad4726a85ee27750db6e24443343601 (HEAD, refs/bisect/bad)
Author: Russ Allbery <rra@stanford.edu>
AuthorDate: Tue Dec 6 22:40:57 2022 +0000
Commit: James E Keenan <jkeenan@cpan.org>
CommitDate: Fri Dec 9 10:43:28 2022 -0500
Update podlators to CPAN version 5.00
However, that commit was quite large, so simply identifying the offending commit does not, in and of itself, identify the problem or the remedy. Further research needed (which will first have to be tested upstream).
Note: Perl 5 Porters does not, to my knowledge, maintain any "official Docker images." We only maintain the core distribution, for which we issue monthly developmental releases, an annual production release (around May 20), and maintenance releases as needed. So you'll have to look elsewhere for Docker images.
Note: Perl 5 Porters does not, to my knowledge, maintain any "official Docker images." We only maintain the core distribution, for which we issue monthly developmental releases, an annual production release (around May 20), and maintenance releases as needed. So you'll have to look elsewhere for Docker images.
They aren't maintained directly by p5p, but docker images are maintained under this organization:
https://github.com/Perl/docker-perl https://hub.docker.com/_/perl
Is this closable?
I do not think so: cpan/podlators still contains the issue on blead, ref: https://github.com/Perl/perl5/blob/67164c39687a916908b6322d361cdf3d86df59ac/cpan/podlators/lib/Pod/Text.pm#L365
It probably should be updated
@reneeb what do you think? You was the last podlators updater.
This module should be either updated or patched. The cpan version is 5.01, while the mainline in repo does already contain the fix. Maybe we should ask @rra to release next version and upload it to cpan?
The next release of podlators will be a major version bump with quite a lot of changes, and we're outside the merge window for dual-life modules.
I think the best strategy for fixing this bug in Perl 5.40, if this is possible (I'm not deeply familiar with the core rules about dual-life Perl modules), would be to cherry-pick https://github.com/rra/podlators/commit/16670945b10ce7f0ee6fa215598913db5da115f9 into core. That's a very small, low-impact change that only fixes this bug, and then the divergence can be dropped after the release freeze when the next major version of podlators is imported.
I could also make a patch release if that's necessary, but I will hopefully release podlators v6.0.0 within the next week or two and have so far avoided needing to juggle patch releases.
IMO this should be cherry-picked, it's a trivial one-line change and it fixes a real issue.
However, at this stage I think this needs a PSC decision.
I'm marking this as a blocker.
PR with a cherry-pick: https://github.com/Perl/perl5/pull/22165
Description We have observed that starting from version 5.38.0, there has been a change in behavior.
We are using official docker images of perl.
Here is the test script, I've saved it in file
not_working.pl
:On docker image perl:5.36.3 (the latest image of 5.36) it is working as expected:
But starting from perl:5.38.0. it does not work. See that instaed of
你好
it output garbage:The problem still persist on perl:5.38.2 (the latest 5.38.*):
Steps to Reproduce
Please see the prvious section for the exact steps.
Expected behavior
I expect that the output of the script running in Perl version 5.38.2 should be identical to that in Perl version 5.36.3. However, the output differs.
Perl configuration
I'm using the official docker image, but here it is: