Skip Menu |

This queue is for tickets about the Log-Dispatch-File-Alerts CPAN distribution.

Report information
The Basics
Id: 120377
Status: open
Priority: 0/
Queue: Log-Dispatch-File-Alerts

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

Bug Information
Severity: (no value)
Broken in: 1.04
Fixed in: (no value)



CC: DROLSKY [...] cpan.org
Subject: Unknown open() mode '' (with newer Log::Dispatch?)
My smokers started to report the following failure: ... Use of uninitialized value in open at /opt/perl-5.25.10/lib/site_perl/5.25.10/Log/Dispatch/File.pm line 94. Unknown open() mode '' at /opt/perl-5.25.10/lib/site_perl/5.25.10/Log/Dispatch/File.pm line 94. t/3.t .......... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 6/8 subtests ... (etc) ... Statistical analysis suggests that this happens with newer Log::Dispatch versions: **************************************************************** Regression 'mod:Log::Dispatch' **************************************************************** Name Theta StdErr T-stat [0='const'] 1.0000 0.0000 18626963268129496.00 [1='eq_2.42'] 0.0000 0.0000 1.59 [2='eq_2.44'] 0.0000 0.0000 0.00 [3='eq_2.50'] 0.0000 0.0000 0.80 [4='eq_2.51'] -0.0000 0.0000 -0.62 [5='eq_2.54'] 0.0000 0.0000 0.00 [6='eq_2.56'] -0.0000 0.0000 -2.12 [7='eq_2.57'] -0.0000 0.0000 -3.43 [8='eq_2.58'] -0.0000 0.0000 -1.53 [9='eq_2.62'] -1.0000 0.0000 -8780834693204732.00 [10='eq_2.63'] -1.0000 0.0000 -14913506195603738.00 R^2= 1.000, N= 101, K= 11 **************************************************************** However reading the Log::Dispatch Changes file I cannot identify a specific change causing the problem...
On 2017-02-25 14:31:42, SREZIC wrote: Show quoted text
> My smokers started to report the following failure: > > ... > Use of uninitialized value in open at /opt/perl- > 5.25.10/lib/site_perl/5.25.10/Log/Dispatch/File.pm line 94. > Unknown open() mode '' at /opt/perl- > 5.25.10/lib/site_perl/5.25.10/Log/Dispatch/File.pm line 94. > t/3.t .......... > Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 6/8 subtests > ... (etc) ... > > > Statistical analysis suggests that this happens with newer > Log::Dispatch versions: > > **************************************************************** > Regression 'mod:Log::Dispatch' > **************************************************************** > Name Theta StdErr T-stat > [0='const'] 1.0000 0.0000 18626963268129496.00 > [1='eq_2.42'] 0.0000 0.0000 1.59 > [2='eq_2.44'] 0.0000 0.0000 0.00 > [3='eq_2.50'] 0.0000 0.0000 0.80 > [4='eq_2.51'] -0.0000 0.0000 -0.62 > [5='eq_2.54'] 0.0000 0.0000 0.00 > [6='eq_2.56'] -0.0000 0.0000 -2.12 > [7='eq_2.57'] -0.0000 0.0000 -3.43 > [8='eq_2.58'] -0.0000 0.0000 -1.53 > [9='eq_2.62'] -1.0000 0.0000 -8780834693204732.00 > [10='eq_2.63'] -1.0000 0.0000 -14913506195603738.00 > > R^2= 1.000, N= 101, K= 11 > **************************************************************** > > > However reading the Log::Dispatch Changes file I cannot identify a > specific change causing the problem...
The problem is that this module depends on _basic_init processing the $p{mode} setting, but I moved that to Log::Dispatch::File->new. I think the simplest fix is for this module to simply set "$self->{mode} = '>>' after calling _basic_init. That's a little gross though, since it still relies on parent class internals. I'm not sure I can come up with a better fix without using something like Moo (which I'd love to do) so that there are proper BUILD and BUILDARGS methods available.