Skip Menu |

This queue is for tickets about the XML-Twig CPAN distribution.

Report information
The Basics
Id: 72765
Status: resolved
Priority: 0/
Queue: XML-Twig

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



Subject: $[ warnings
Date: Mon, 28 Nov 2011 10:49:01 +1100
To: bug-XML-Twig [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
A recent cpantesters report for one of my programs on perl 5.15.5 included some warnings from XML::Twig http://www.cpantesters.org/cpan/report/3c3a45ea-151b-11e1-953f-bc4e84dee9ce $[ used in numeric lt (<) (did you mean $] ?) at /home/sts/cpansmoke/perl-5.15.5/cpan/build/XML-Twig-3.39-t0aAhT/blib/lib/XML/Twig.pm line 7286. $[ used in numeric lt (<) (did you mean $] ?) at /home/sts/cpansmoke/perl-5.15.5/cpan/build/XML-Twig-3.39-t0aAhT/blib/lib/XML/Twig.pm line 7292. $[ used in numeric lt (<) (did you mean $] ?) at /home/sts/cpansmoke/perl-5.15.5/cpan/build/XML-Twig-3.39-t0aAhT/blib/lib/XML/Twig.pm line 7304. From the way it's used I presume $] perl version is intended, rather than $[ the starting array index.
On Sun Nov 27 18:49:20 2011, user42@zip.com.au wrote: Show quoted text
> A recent cpantesters report for one of my programs on perl 5.15.5 > included some warnings from XML::Twig > > http://www.cpantesters.org/cpan/report/3c3a45ea-151b-11e1-953f- > bc4e84dee9ce > > $[ used in numeric lt (<) (did you mean $] ?) at > /home/sts/cpansmoke/perl-5.15.5/cpan/build/XML-Twig-3.39- > t0aAhT/blib/lib/XML/Twig.pm line 7286. > $[ used in numeric lt (<) (did you mean $] ?) at > /home/sts/cpansmoke/perl-5.15.5/cpan/build/XML-Twig-3.39- > t0aAhT/blib/lib/XML/Twig.pm line 7292. > $[ used in numeric lt (<) (did you mean $] ?) at > /home/sts/cpansmoke/perl-5.15.5/cpan/build/XML-Twig-3.39- > t0aAhT/blib/lib/XML/Twig.pm line 7304. > > From the way it's used I presume $] perl version is intended, rather > than $[ the starting array index.
I’m happy to see the warning is proving useful. :-)
Subject: Re: [rt.cpan.org #72765] $[ warnings
Date: Tue, 29 Nov 2011 17:25:03 +0100
To: bug-XML-Twig [...] rt.cpan.org
From: mirod <xmltwig [...] gmail.com>
On 11/28/2011 12:49 AM, Kevin Ryde via RT wrote: Show quoted text
> Sun Nov 27 18:49:20 2011: Request 72765 was acted upon. > Transaction: Ticket created by user42@zip.com.au > Queue: XML-Twig > Subject: $[ warnings > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: user42@zip.com.au > Status: new > Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=72765> > > > A recent cpantesters report for one of my programs on perl 5.15.5 > included some warnings from XML::Twig > > http://www.cpantesters.org/cpan/report/3c3a45ea-151b-11e1-953f-bc4e84dee9ce > > $[ used in numeric lt (<) (did you mean $] ?) at /home/sts/cpansmoke/perl-5.15.5/cpan/build/XML-Twig-3.39-t0aAhT/blib/lib/XML/Twig.pm line 7286. > $[ used in numeric lt (<) (did you mean $] ?) at /home/sts/cpansmoke/perl-5.15.5/cpan/build/XML-Twig-3.39-t0aAhT/blib/lib/XML/Twig.pm line 7292. > $[ used in numeric lt (<) (did you mean $] ?) at /home/sts/cpansmoke/perl-5.15.5/cpan/build/XML-Twig-3.39-t0aAhT/blib/lib/XML/Twig.pm line 7304. > > From the way it's used I presume $] perl version is intended, rather > than $[ the starting array index.
Duh! I have a fixed version on github and on xmltwig.org. Now I have to figure out why this passed the tests and if the test is needed at all. Thanks for reporting this. -- mirod
Subject: Re: [rt.cpan.org #72765] $[ warnings
Date: Wed, 30 Nov 2011 11:14:18 +1100
To: bug-XML-Twig [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Father Chrysostomos via RT" <bug-XML-Twig@rt.cpan.org> writes: Show quoted text
> > I’m happy to see the warning is proving useful. :-)
I don't like these sort of warnings, they spam all users (as in this case :-) on every run, where the target is only one or two authors. I would recommend perlcritic as the starting point for most such doubtful-code detection, since it's unintrusive and can be tinkered around with to find good conditions for badness to report. Of course much of perlcritic is far too restrictive or designed for beginners, etc, but if the "bugs" theme is true to its name then that'd be a starting point. -- Two birds were sitting in a tree when an air force jet flew overhead low and fast. "Strewth, did you see that big bird, it was really moving." The other said, "Yeah, you'd be moving too if your arse was on fire."
fixed in 3.40 __ mirod