Skip Menu |

This queue is for tickets about the Text-Query CPAN distribution.

Report information
The Basics
Id: 47252
Status: resolved
Priority: 0/
Queue: Text-Query

People
Owner: jon [...] endpoint.com
Requestors: bitcard.org [...] hertell.com
Cc:
AdminCc:

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



Subject: Text::Query fails to compile with perl-5.10.0
Text::Query fails to compile with perl-5.10.0 This is the output: tigger:/usr/local# /usr/local/perl-5.10.0/bin/perl -MCPAN -e 'install Text::Query # CPAN: Storable loaded ok (v2.20) # Going to read '/root/.cpan/Metadata' # Database was generated on Sun, 21 Jun 2009 19:28:21 GMT # CPAN: YAML loaded ok (v0.68) # Going to read 47 yaml files from /root/.cpan/build/ # CPAN: Time::HiRes loaded ok (v1.9711) # ............................................................................DONE # Restored the state of 32 (in 1.0751 secs) # Running install for module 'Text::Query' # Running make for E/EB/EBOHLMAN/Text-Query-0.07.tar.gz # Has already been unwrapped into directory /root/.cpan/build/Text-Query-0.07-XPtPSv # Has already been made # Running make test # PERL_DL_NONLAZY=1 /usr/local/perl-5.10.0/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t # t/01default.t .. 1/18 Text::Query::ParseAdvanced::factor() called too early to check prototype at /root/.cpan/build/Text-Query-0.07-XPtPSv/blib/lib/Text/Query/ParseAdvanced.pm line 114. # Text::Query::ParseAdvanced::factor() called too early to check prototype at /root/.cpan/build/Text-Query-0.07-XPtPSv/blib/lib/Text/Query/ParseAdvanced.pm line 122. # t/01default.t .. ok # t/02string.t ... 1/56 Can't use string ("2") as an ARRAY ref while "strict refs" in use at /root/.cpan/build/Text-Query-0.07-XPtPSv/blib/lib/Text/Query/SolveSimpleString.pm line 52. # t/02string.t ... Dubious, test returned 9 (wstat 2304, 0x900) # Failed 30/56 subtests # # Test Summary Report # ------------------- # t/02string.t (Wstat: 2304 Tests: 26 Failed: 0) # Non-zero exit status: 9 # Parse errors: Bad plan. You planned 56 tests but ran 26. # Files=2, Tests=44, 0 wallclock secs ( 0.05 usr 0.02 sys + 0.08 cusr 0.01 csys = 0.16 CPU) # Result: FAIL # Failed 1/2 test programs. 0/44 subtests failed. # make: *** [test_dynamic] Error 9 # EBOHLMAN/Text-Query-0.07.tar.gz # /usr/bin/make test -- NOT OK # //hint// to see the cpan-testers results for installing this module, try: # reports EBOHLMAN/Text-Query-0.07.tar.gz # Running make install # make test had returned bad status, won't install without force
From: peter [...] pajamian.dhs.org
Actually it compiles fine, the problem is that it fails make test. This issue is addressed here: http://www.nntp.perl.org/group/perl.perl5.porters/2007/07/msg126451.html Specifically line 52 needs to be replaced with: ra = sort { $b->[-1] <=> $a->[-1] } @ra;
On Mon Jun 22 17:19:10 2009, peter@pajamian.dhs.org wrote: Show quoted text
> Specifically line 52 needs to be replaced with: > ra = sort { $b->[-1] <=> $a->[-1] } @ra;
Misspaste: that line is actually: @ra = sort { $b->[-1] <=> $a->[-1] } @ra;
From: bitcard.org [...] hertell.com
On Mon Jun 22 17:19:58 2009, peter@pajamian.dhs.org wrote: Show quoted text
> On Mon Jun 22 17:19:10 2009, peter@pajamian.dhs.org wrote:
> > Specifically line 52 needs to be replaced with: > > ra = sort { $b->[-1] <=> $a->[-1] } @ra;
> > Misspaste: that line is actually: > @ra = sort { $b->[-1] <=> $a->[-1] } @ra; >
Here is a patch to fix this bug. Please someone patch this so that the test-phase does not fail..
Subject: textquery.diff
--- lib/Text/Query/SolveSimpleString.pm 2011-02-07 19:30:16.000000000 +0200 +++ lib/Text/Query/SolveSimpleString.pm_old 2011-02-07 19:28:37.000000000 +0200 @@ -49,7 +49,7 @@ } else { @ra = map { [ $_, $self->matchscalar($expr, $_) ] } @$pa; } - @ra = sort { $b->[-1] <=> $a->[-1] } @ra; + @ra = sort { $b->[$#{@$b}] <=> $a->[$#{@$a}] } @ra; return wantarray ? @ra : \@ra; }
From: bitcard.org [...] hertell.com
On Mon Feb 07 12:34:51 2011, bitcard.org@hertell.com wrote: Show quoted text
> On Mon Jun 22 17:19:58 2009, peter@pajamian.dhs.org wrote:
> > On Mon Jun 22 17:19:10 2009, peter@pajamian.dhs.org wrote:
> > > Specifically line 52 needs to be replaced with: > > > ra = sort { $b->[-1] <=> $a->[-1] } @ra;
> > > > Misspaste: that line is actually: > > @ra = sort { $b->[-1] <=> $a->[-1] } @ra; > >
> > Here is a patch to fix this bug. Please someone patch this so that the > test-phase does not fail..
Embarassing.. did a patch, but the other way around.. Now it should be correct!
Subject: textquery.diff
--- lib/Text/Query/SolveSimpleString.pm_old 2011-02-07 19:28:37.000000000 +0200 +++ lib/Text/Query/SolveSimpleString.pm 2011-02-07 19:30:16.000000000 +0200 @@ -49,7 +49,7 @@ } else { @ra = map { [ $_, $self->matchscalar($expr, $_) ] } @$pa; } - @ra = sort { $b->[$#{@$b}] <=> $a->[$#{@$a}] } @ra; + @ra = sort { $b->[-1] <=> $a->[-1] } @ra; return wantarray ? @ra : \@ra; }
This is fixed in a new release: http://search.cpan.org/~jonj/Text-Query-0.09/