Skip Menu |

This queue is for tickets about the ParseLex CPAN distribution.

Report information
The Basics
Id: 53112
Status: resolved
Priority: 0/
Queue: ParseLex

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

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



Subject: Test suite fails on v5.10.0 built for MSWin32-x86-multi-thread
Test suite fails on v5.10.0 built for MSWin32-x86-multi-thread.

Issues fixed with the attached patch file:

1) lib/Parse/Template.pm was missing a semicolon after "use strict";
2) lib/Parse/Template.pm was using an undeclared $expr variable;
3) lib/Parse/Template.pm was declaring a Parse::Token::Nested package with a recursive inheritance;
4) t/W.pm was calling $cmd without adding the include path of the compiled module, added "-Iblib/lib";
5) t/test4.t failed because it expected "at examples/ctokenizer.pl line 17, <DATA> chunk 4", but the current perl version returns "at examples/ctokenizer.pl line 17, <DATA> line 4".

With the attached patch installed, all tests pass on my platform.


Subject: ParseLex-2.15-patch.txt
diff -r -c ParseLex-2.15/examples/ctokenizer.pl ParseLex-2.15a/examples/ctokenizer.pl *** ParseLex-2.15/examples/ctokenizer.pl Thu Sep 23 10:16:24 1999 --- ParseLex-2.15a/examples/ctokenizer.pl Sat Dec 26 19:19:56 2009 *************** *** 1,7 **** #!/usr/local/bin/perl -w require 5.000; ! BEGIN { unshift @INC, "../lib"; } use Parse::CLex; @token = ( --- 1,7 ---- #!/usr/local/bin/perl -w require 5.000; ! #BEGIN { unshift @INC, "../lib"; } use Parse::CLex; @token = ( diff -r -c ParseLex-2.15/lib/Parse/Template.pm ParseLex-2.15a/lib/Parse/Template.pm *** ParseLex-2.15/lib/Parse/Template.pm Thu Sep 23 10:16:28 1999 --- ParseLex-2.15a/lib/Parse/Template.pm Sat Dec 26 18:25:40 2009 *************** *** 1,4 **** ! use strict require 5.004; package Parse::Template; $Parse::Template::VERSION = '0.32'; --- 1,4 ---- ! use strict; require 5.004; package Parse::Template; $Parse::Template::VERSION = '0.32'; *************** *** 132,138 **** } # evaluated expressions are not always available in (caller(1))[6]; if (defined($1) and $1 ne '') { ! $expr = $1; # what is the template expression? { package DB; # what is the part name? @DB::caller = caller(2); # why is this needed? /ee? @DB::caller = caller(1); --- 132,138 ---- } # evaluated expressions are not always available in (caller(1))[6]; if (defined($1) and $1 ne '') { ! my $expr = $1; # what is the template expression? { package DB; # what is the part name? @DB::caller = caller(2); # why is this needed? /ee? @DB::caller = caller(1); diff -r -c ParseLex-2.15/lib/Parse/Token.pm ParseLex-2.15a/lib/Parse/Token.pm *** ParseLex-2.15/lib/Parse/Token.pm Mon Sep 27 13:18:06 1999 --- ParseLex-2.15a/lib/Parse/Token.pm Sat Dec 26 18:31:20 2009 *************** *** 1125,1140 **** [$start, $content, $end]; } ! package Parse::Token::Nested; ! use Parse::Trace; ! @Parse::Token::Nested::ISA = qw(Parse::Token::Nested Parse::Trace); ! # Examples: # (+ (* 3 4) 4) # ! sub new { ! die "Sorry! Not yet implemented"; ! } 1; __END__ --- 1125,1140 ---- [$start, $content, $end]; } ! #package Parse::Token::Nested; ! #use Parse::Trace; ! #@Parse::Token::Nested::ISA = qw(Parse::Token::Nested Parse::Trace); ! # # Examples: # (+ (* 3 4) 4) # ! #sub new { ! # die "Sorry! Not yet implemented"; ! #} 1; __END__ *************** *** 1409,1418 **** C<Parse::Token::Quoted> : permits recognizing, for example, character strings within quotation marks. ! C<Parse::Token::Nested> : permits recognizing nested structures ! such as parenthesized expressions. NOT DEFINED. ! These classes are recently created and no doubt contain some bugs. =head2 Parse::Token::Action --- 1409,1420 ---- C<Parse::Token::Quoted> : permits recognizing, for example, character strings within quotation marks. ! =cut ! #C<Parse::Token::Nested> : permits recognizing nested structures ! #such as parenthesized expressions. NOT DEFINED. ! # ! #These classes are recently created and no doubt contain some bugs. =head2 Parse::Token::Action diff -r -c ParseLex-2.15/t/W.pm ParseLex-2.15a/t/W.pm *** ParseLex-2.15/t/W.pm Thu Sep 23 10:16:26 1999 --- ParseLex-2.15a/t/W.pm Sat Dec 26 18:20:44 2009 *************** *** 22,37 **** my @err; my $result; if ($cmd) { ! print "Execution of $^X $cmd\n" if $verbose; die qq^unable to find "$cmd"^ unless (-f $cmd); # the following line doesn't work on Win95 (ActiveState's Perl, build 516): ! # open( CMD, "$^X $cmd 2>err |" ) or warn "$0: Can't run. $!\n"; # corrected by Stefan Becker: local *SAVE_STDERR; open(SAVE_STDERR, ">&STDERR"); open STDERR, "> err"; ! open( CMD, "$^X $cmd |" ) or warn "$0: Can't run. $!\n"; @result = <CMD>; close CMD; close STDERR; --- 22,37 ---- my @err; my $result; if ($cmd) { ! print "Execution of $^X -Iblib/lib $cmd\n" if $verbose; die qq^unable to find "$cmd"^ unless (-f $cmd); # the following line doesn't work on Win95 (ActiveState's Perl, build 516): ! # open( CMD, "$^X -Iblib/lib $cmd 2>err |" ) or warn "$0: Can't run. $!\n"; # corrected by Stefan Becker: local *SAVE_STDERR; open(SAVE_STDERR, ">&STDERR"); open STDERR, "> err"; ! open( CMD, "$^X -Iblib/lib $cmd |" ) or warn "$0: Can't run. $!\n"; @result = <CMD>; close CMD; close STDERR; *************** *** 46,52 **** $self->{result} = join('', @result); if ($log) { print LOG "=" x 80, "\n"; ! print LOG "Execution of $^X $cmd 2>err\n"; print LOG "=" x 80, "\n"; print LOG "* Result:\n"; print LOG "-" x 80, "\n"; --- 46,52 ---- $self->{result} = join('', @result); if ($log) { print LOG "=" x 80, "\n"; ! print LOG "Execution of $^X -Iblib/lib $cmd 2>err\n"; print LOG "=" x 80, "\n"; print LOG "* Result:\n"; print LOG "-" x 80, "\n"; diff -r -c ParseLex-2.15/t/test4.t ParseLex-2.15a/t/test4.t *** ParseLex-2.15/t/test4.t Thu Sep 23 10:16:26 1999 --- ParseLex-2.15a/t/test4.t Sat Dec 26 19:36:38 2009 *************** *** 10,17 **** print $test->report(1, sub { my $expectation = $test->expected; my $result = $test->result; ! $expectation =~ s/\s+$//; ! $result =~ s/\s+$//; unless ($expectation eq $result) { print "$result\n" if $ENV{TEST_VERBOSE}; 0; --- 10,17 ---- print $test->report(1, sub { my $expectation = $test->expected; my $result = $test->result; ! $expectation =~ s/\s+$//; $expectation =~ s/<DATA> (chunk|line)/<DATA> line/g; ! $result =~ s/\s+$//; $result =~ s/<DATA> (chunk|line)/<DATA> line/g; unless ($expectation eq $result) { print "$result\n" if $ENV{TEST_VERBOSE}; 0; Only in ParseLex-2.15a: testlog
 VERSION 2.16 - 5/01/2010
 
o New maintainer pscust@cpan.org
o Parse::Template 0.33 : Fix syntax errors
  Solves RT #7880, #12845, #14785, #11807, #48964, #53112
o Parse::Token    2.16 : Fix syntax errors
  Solves RT #12845, #36285, #48964, #53112
o test4.t : adapt to current Perl (line vs chunk)
  Solves RT #158, #11808, #11809, #12846, #14785, #48964, #53112
o tests : add blib/lib to Perl path
  Solves RT #48964, #53112
o Added test8.t with code from RT #1861, but error is not reproduced in Perl 5.10, and 
  patch does not work in Perl 5.10; patch not added.