Skip Menu |

This queue is for tickets about the DBM-Deep CPAN distribution.

Report information
The Basics
Id: 123811
Status: resolved
Priority: 0/
Queue: DBM-Deep

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc: SREZIC [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: 2.0014
Fixed in: 2.0015



Subject: Cross reference to bleadperl breaks cpan (BBC) ticket
For the record: DBM-Deep-2.0014 has been mentioned in https://rt.perl.org/Public/Bug/Display.html?id=132493
RT-Send-CC: sprout [...] cpan.org
On 2017-12-03 04:00:54, ANDK wrote: Show quoted text
> For the record: DBM-Deep-2.0014 has been mentioned in > https://rt.perl.org/Public/Bug/Display.html?id=132493
A possible patch: http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/DBM-Deep-2.0014-RT123811.patch (Father Chrysostomos, can you review?)
Subject: Re: [rt.cpan.org #123811] Cross reference to bleadperl breaks cpan (BBC) ticket
Date: Sat, 20 Jan 2018 09:32:08 -0800
To: bug-DBM-Deep [...] rt.cpan.org
From: Father Chrysostomos <sprout [...] cpan.org>
On Jan 20, 2018, at 6:02 AM, "Slaven_Rezic via RT" <bug-DBM-Deep@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=123811 > > > On 2017-12-03 04:00:54, ANDK wrote:
>> For the record: DBM-Deep-2.0014 has been mentioned in >> https://rt.perl.org/Public/Bug/Display.html?id=132493
> > A possible patch: > http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/DBM-Deep-2.0014-RT123811.patch > > (Father Chrysostomos, can you review?)
Thank you for beating me to it. You just shrank my list of modules to patch. The patch looks fine. I will mention, though, that it could be simpler. warnings::warnif_at_level already contains the warn/die logic.
RT-Send-CC: sprout [...] cpan.org
On 2018-01-20 12:38:13, sprout@cpan.org wrote: Show quoted text
> > On Jan 20, 2018, at 6:02 AM, "Slaven_Rezic via RT" <bug-DBM- > Deep@rt.cpan.org> wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=123811 > > > > > On 2017-12-03 04:00:54, ANDK wrote:
> >> For the record: DBM-Deep-2.0014 has been mentioned in > >> https://rt.perl.org/Public/Bug/Display.html?id=132493
> > > > A possible patch: > > http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/DBM-Deep- > > 2.0014-RT123811.patch > > > > (Father Chrysostomos, can you review?)
> > Thank you for beating me to it. You just shrank my list of modules to > patch. The patch looks fine. I will mention, though, that it could > be simpler. warnings::warnif_at_level already contains the warn/die > logic.
Something like this? if(defined &warnings::warnif_at_level) { # perl >= 5.27.8 warnings::warnif_at_level($_[0], $level-1, $_[1]); } else { However, the test suite still fails with this change, and there's a stray filehandle+line in the warning message: not ok 10 - assigning a stale reference to the DB dies w/FATAL warnings # Failed test 'assigning a stale reference to the DB dies w/FATAL warnings' # at t/39_singletons.t line 56. # got: 'Assignment of stale reference at t/39_singletons.t line 54, <$fh> line 0. # ' # expected: 'Assignment of stale reference at t/39_singletons.t line 54. # ' not ok 11 - assigning a stale reference back to the DB warns # Failed test 'assigning a stale reference back to the DB warns' # at t/39_singletons.t line 62. # got: 'Assignment of stale reference at t/39_singletons.t line 61, <$fh> line 0. # ' # expected: 'Assignment of stale reference at t/39_singletons.t line 61. # '
RT-Send-CC: sprout [...] cpan.org
On 2018-02-05 16:32:03, SREZIC wrote: Show quoted text
> On 2018-01-20 12:38:13, sprout@cpan.org wrote:
> > > > On Jan 20, 2018, at 6:02 AM, "Slaven_Rezic via RT" <bug-DBM- > > Deep@rt.cpan.org> wrote: > >
> > > <URL: https://rt.cpan.org/Ticket/Display.html?id=123811 > > > > > > > On 2017-12-03 04:00:54, ANDK wrote:
> > >> For the record: DBM-Deep-2.0014 has been mentioned in > > >> https://rt.perl.org/Public/Bug/Display.html?id=132493
> > > > > > A possible patch: > > > http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/DBM- > > > Deep- > > > 2.0014-RT123811.patch > > > > > > (Father Chrysostomos, can you review?)
> > > > Thank you for beating me to it. You just shrank my list of modules > > to > > patch. The patch looks fine. I will mention, though, that it could > > be simpler. warnings::warnif_at_level already contains the warn/die > > logic.
> > Something like this? > > if(defined &warnings::warnif_at_level) { # perl >= 5.27.8 > warnings::warnif_at_level($_[0], $level-1, $_[1]); > } else { > > However, the test suite still fails with this change, and there's a > stray filehandle+line in the warning message: > > not ok 10 - assigning a stale reference to the DB dies w/FATAL > warnings > # Failed test 'assigning a stale reference to the DB dies w/FATAL > warnings' > # at t/39_singletons.t line 56. > # got: 'Assignment of stale reference at t/39_singletons.t > line 54, <$fh> line 0. > # ' > # expected: 'Assignment of stale reference at t/39_singletons.t > line 54. > # ' > not ok 11 - assigning a stale reference back to the DB warns > # Failed test 'assigning a stale reference back to the DB warns' > # at t/39_singletons.t line 62. > # got: 'Assignment of stale reference at t/39_singletons.t > line 61, <$fh> line 0. > # ' > # expected: 'Assignment of stale reference at t/39_singletons.t > line 61. > # '
"<$fh> line 0" seems to happen if a previously read filehandle was closed. To reproduce: #!/usr/bin/perl use strict; { package Bla; sub xxx { warnings::warnif_at_level("uninitialized", 0, "blubber bla"); } } open my $fh, "<", $0; <$fh>; close $fh; use warnings; Bla::xxx(); __END__ Output: blubber bla at /tmp/warn.pl line 16, <$fh> line 0. So maybe the filehandle stuff in warnings::__chk should be rewritten to $stuff .= ", <" . *${^LAST_FH}{NAME} . "> line $." if $. && ${^LAST_FH}; ?
On Mon Feb 05 16:45:42 2018, SREZIC wrote: Show quoted text
> On 2018-02-05 16:32:03, SREZIC wrote:
> > On 2018-01-20 12:38:13, sprout@cpan.org wrote:
> > > > > > On Jan 20, 2018, at 6:02 AM, "Slaven_Rezic via RT" <bug-DBM- > > > Deep@rt.cpan.org> wrote: > > >
> > > > <URL: https://rt.cpan.org/Ticket/Display.html?id=123811 > > > > > > > > > On 2017-12-03 04:00:54, ANDK wrote:
> > > >> For the record: DBM-Deep-2.0014 has been mentioned in > > > >> https://rt.perl.org/Public/Bug/Display.html?id=132493
> > > > > > > > A possible patch: > > > > http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/DBM- > > > > Deep- > > > > 2.0014-RT123811.patch > > > > > > > > (Father Chrysostomos, can you review?)
> > > > > > Thank you for beating me to it. You just shrank my list of modules > > > to > > > patch. The patch looks fine. I will mention, though, that it > > > could > > > be simpler. warnings::warnif_at_level already contains the > > > warn/die > > > logic.
> > > > Something like this? > > > > if(defined &warnings::warnif_at_level) { # perl >= 5.27.8 > > warnings::warnif_at_level($_[0], $level-1, $_[1]); > > } else { > > > > However, the test suite still fails with this change, and there's a > > stray filehandle+line in the warning message: > > > > not ok 10 - assigning a stale reference to the DB dies w/FATAL > > warnings > > # Failed test 'assigning a stale reference to the DB dies w/FATAL > > warnings' > > # at t/39_singletons.t line 56. > > # got: 'Assignment of stale reference at t/39_singletons.t > > line 54, <$fh> line 0. > > # ' > > # expected: 'Assignment of stale reference at t/39_singletons.t > > line 54. > > # ' > > not ok 11 - assigning a stale reference back to the DB warns > > # Failed test 'assigning a stale reference back to the DB warns' > > # at t/39_singletons.t line 62. > > # got: 'Assignment of stale reference at t/39_singletons.t > > line 61, <$fh> line 0. > > # ' > > # expected: 'Assignment of stale reference at t/39_singletons.t > > line 61. > > # '
> > "<$fh> line 0" seems to happen if a previously read filehandle was > closed. To reproduce: > > #!/usr/bin/perl > use strict; > > { > package Bla; > sub xxx { > warnings::warnif_at_level("uninitialized", 0, "blubber bla"); > } > } > > open my $fh, "<", $0; > <$fh>; > close $fh; > > use warnings; > Bla::xxx(); > > __END__ > > Output: > > blubber bla at /tmp/warn.pl line 16, <$fh> line 0. > > So maybe the filehandle stuff in warnings::__chk should be rewritten > to > > $stuff .= ", <" . *${^LAST_FH}{NAME} . "> line $." if $. && > ${^LAST_FH}; > > ?
Thank you for that. I’ve applied it to blead as 25ebbc2270 and added tests in commit a7caeb5ea5f8.
On 2017-12-03 01:00:54, ANDK wrote: Show quoted text
> For the record: DBM-Deep-2.0014 has been mentioned in > https://rt.perl.org/Public/Bug/Display.html?id=132493
To clarify for the module author: this distribution is broken on the soon-to-be-released perl 5.28.
On 2018-04-20 05:08:46, ETHER wrote: Show quoted text
> On 2017-12-03 01:00:54, ANDK wrote:
> > For the record: DBM-Deep-2.0014 has been mentioned in > > https://rt.perl.org/Public/Bug/Display.html?id=132493
> > > To clarify for the module author: this distribution is broken on the > soon-to-be-released perl 5.28.
The 5.28 release is imminent, most likely before the end of the month. Please could this or another suitable patch be applied and released? thank you!
Fixed in 2.0015.