Skip Menu |
 

This queue is for tickets about the Error CPAN distribution.

Report information
The Basics
Id: 50573
Status: rejected
Priority: 0/
Queue: Error

People
Owner: SHLOMIF [...] cpan.org
Requestors: ether [...] cpan.org
Cc: karene [...] airg.com
nigelg [...] airg.com
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.17015
Fixed in: (no value)



CC: nigelg [...] airg.com,karene [...] airg.com
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 878
Download (untitled) / with headers
text/plain 878b
Summary: "use strict; use warnings;" are missing in Error.pm after switching namespaces to Error::Simple, which mask the warning I describe below. The problem occurs when one passes no arguments to Error::Simple->new(). The warning that occurs is: Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/Error.pm line 280. This line is: my $text = "" . shift; ---- The warning was originally encountered on a redhat box running perl5.8.5 and Error 0.17015. In perl5.8.8 there is no warning unless I add "use strict; use warnings;" above the constructor's declaration. However we all know that strict checking is highly recommended, as it can reveal problems that otherwise would remain silent. I would suggest changing line 280 to: my $text = "" . (shift || ""); --- credit goes to Nigel Gregoire (nigelg@airg.com) for finding this.
MIME-Version: 1.0
Subject: use strict / use warnings throws an exception.
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-16460-1261172396-1468.50573-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
RT-Send-CC: nigelg [...] airg.com, bitcard [...] froods.org
Content-Length: 1170
Download (untitled) / with headers
text/plain 1.1k
Hi! On Fri Oct 16 15:41:33 2009, bitcard@froods.org wrote: Show quoted text
> Summary: "use strict; use warnings;" are missing in Error.pm after > switching namespaces to Error::Simple, which mask the warning I describe > below. > > The problem occurs when one passes no arguments to Error::Simple->new(). > The warning that occurs is: > Use of uninitialized value in concatenation (.) or string at > /usr/lib/perl5/site_perl/5.8.8/Error.pm line 280. > > This line is: my $text = "" . shift; > > ---- > The warning was originally encountered on a redhat box running perl5.8.5 > and Error 0.17015. In perl5.8.8 there is no warning unless I add "use > strict; use warnings;" above the constructor's declaration. However we > all know that strict checking is highly recommended, as it can reveal > problems that otherwise would remain silent. I would suggest changing > line 280 to: > > my $text = "" . (shift || ""); >
It is unclear from your description what exactly is the problem. Can you provide a small testcase (a self-contained script) which demonstrates the problem? Regards, -- Shlomi Fish Show quoted text
> --- > credit goes to Nigel Gregoire (nigelg@airg.com) for finding this.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-14826-1265280594-1652.50573-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 107
Download (untitled) / with headers
text/plain 107b
Resolving as the original reporter hasn't responded to our query for essential information in over a month.
MIME-Version: 1.0
Subject: Please reopen
In-Reply-To: <rt-3.8.HEAD-14826-1265280594-1652.50573-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-14826-1265280594-1652.50573-0-0 [...] rt.cpan.org>
Message-ID: <rt-3.8.HEAD-14824-1265321833-265.50573-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: binary
From: bitcard [...] froods.org
X-RT-Original-Encoding: utf-8
Content-Length: 670
Download (untitled) / with headers
text/plain 670b
On Thu Feb 04 05:49:54 2010, SHLOMIF wrote: Show quoted text
> Resolving as the original reporter hasn't responded to our query for > essential information in over a month.
Please reopen (if this reply did not do so automatically).. Apologies, your replies got lost in my spam folder :( Repro steps (line numbers are for version 0.17016) 1. Edit Error.pm and add "use strict; use warnings;" on line 259 (just after "package Error::Simple;" 2. run: perl -MError -we'Error::Simple->new();' Observe the warning: Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/Error.pm line 264. This is because of the line: 264: my $text = "" . shift;
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-14824-1265321833-265.50573-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-14826-1265280594-1652.50573-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-14824-1265321833-265.50573-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-14826-1265361184-1166.50573-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1164
Download (untitled) / with headers
text/plain 1.1k
On Thu Feb 04 17:17:13 2010, bitcard@froods.org wrote: Show quoted text
> On Thu Feb 04 05:49:54 2010, SHLOMIF wrote:
> > Resolving as the original reporter hasn't responded to our query for > > essential information in over a month.
> > Please reopen (if this reply did not do so automatically).. > Apologies, your replies got lost in my spam folder :(
OK. Please make sure to whitelist them. Show quoted text
> > Repro steps (line numbers are for version 0.17016) > 1. Edit Error.pm and add "use strict; use warnings;" on line 259 (just > after "package Error::Simple;" > 2. run: perl -MError -we'Error::Simple->new();' > > Observe the warning: > Use of uninitialized value in concatenation (.) or string at > /usr/lib/perl5/site_perl/5.8.8/Error.pm line 264. > > This is because of the line: > 264: my $text = "" . shift; >
OK, I see it now. However, this warning is in place because the Error::Simple contract (see http://search.cpan.org/dist/Error/lib/Error/Simple.pm ) specifically says that Error::Simple accepts one compulsory text variable - «Error::Simple->new($text [, $value])». If you don't specify it - it's your problem. Can I close it now? Regards, -- Shlomi Fish
X-Cloudmark-SP-Result: v=1.0 c=1 a=AC4b6R8PCdgA:10 a=yWGpUvpOPXJ/Xj1OG0qftQ==:17 a=eNcD7ojaAAAA:8 a=GKDVclskkJFz2103DpgA:9 a=BaEUXAz8rJSHD7481eNpC_iAB2gA:4
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=
In-Reply-To: <rt-3.8.HEAD-14826-1265361184-1021.50573-6-0 [...] rt.cpan.org>
X-Cloudmark-SP-Filtered: true
Content-Disposition: inline
References: <RT-Ticket-50573 [...] rt.cpan.org> <rt-3.8.HEAD-14826-1265280594-1652.50573-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-14824-1265321833-265.50573-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-14826-1265361184-1021.50573-6-0 [...] rt.cpan.org>
Message-ID: <20100209011756.GA28157 [...] tequila.local>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 347744D8027 for <bug-Error [...] rt.cpan.org>; Mon, 8 Feb 2010 20:18:45 -0500 (EST)
Received: (qmail 19564 invoked by uid 103); 9 Feb 2010 01:18:44 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 9 Feb 2010 01:18:44 -0000
Received: from idcmail-mo1so.shaw.ca (HELO idcmail-mo1so.shaw.ca) (24.71.223.10) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Mon, 08 Feb 2010 17:18:08 -0800
Received: from pd3ml3so-ssvc.prod.shaw.ca ([10.0.141.149]) by pd4mo1so-svcs.prod.shaw.ca with ESMTP; 08 Feb 2010 18:17:57 -0700
Received: from unknown (HELO etheridge.ca) ([70.71.10.193]) by pd3ml3so-dmz.prod.shaw.ca with ESMTP; 08 Feb 2010 18:17:57 -0700
Delivered-To: cpan-bug+Error [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #50573]
User-Agent: Mutt/1.4.2.3i
Return-Path: <bitcard [...] froods.org>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Error [...] rt.cpan.org
Date: Mon, 8 Feb 2010 17:17:56 -0800
X-Spam-Level: *
To: Shlomi Fish via RT <bug-Error [...] rt.cpan.org>
Content-Transfer-Encoding: 8bit
From: Karen Etheridge <bitcard [...] froods.org>
RT-Message-ID: <rt-3.8.HEAD-14820-1265678349-197.50573-0-0 [...] rt.cpan.org>
Content-Length: 430
Download (untitled) / with headers
text/plain 430b
On Fri, Feb 05, 2010 at 04:13:05AM -0500, Shlomi Fish via RT wrote: Show quoted text
> OK, I see it now. However, this warning is in place because the > Error::Simple contract (see > http://search.cpan.org/dist/Error/lib/Error/Simple.pm ) specifically > says that Error::Simple accepts one compulsory text variable - > «Error::Simple->new($text [, $value])». If you don't specify it - it's > your problem. > > Can I close it now?
Yes. --Ether
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-14824-1265719635-751.50573-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 8
Closing.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.