Skip Menu |

This queue is for tickets about the TRD-Velocity CPAN distribution.

Report information
The Basics
Id: 117459
Status: open
Priority: 0/
Queue: TRD-Velocity

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

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



Subject: Unescaped left brace in regex is illegal here in regex
Module compilation fails with bleadperl (e.g. perl 5.25.4): # Failed test 'use TRD::Velocity;' # at t/00-load.t line 6. # Tried to use 'TRD::Velocity'. # Error: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([\w\.-\[\]]+)}\.escape\(\)/ at /tmpfs/.cpan-build-cpansand/2016090306/TRD-Velocity-0.0.8-0/blib/lib/TRD/Velocity.pm line 142. # Compilation failed in require at t/00-load.t line 6. # BEGIN failed--compilation aborted at t/00-load.t line 6. # Testing TRD::Velocity , Perl 5.025004, /bbbike/perl-5.25.4/bin/perl5.25.4 # Looks like you failed 1 test of 1. t/00-load.t ........ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests See also http://matrix.cpantesters.org/?dist=TRD-Velocity%200.0.8
On Sat Sep 03 04:14:25 2016, SREZIC wrote: Show quoted text
> Module compilation fails with bleadperl (e.g. perl 5.25.4): > > # Failed test 'use TRD::Velocity;' > # at t/00-load.t line 6. > # Tried to use 'TRD::Velocity'. > # Error: Unescaped left brace in regex is illegal here in regex; > marked by <-- HERE in m/\${ <-- HERE ([\w\.-\[\]]+)}\.escape\(\)/ at > /tmpfs/.cpan-build-cpansand/2016090306/TRD-Velocity-0.0.8- > 0/blib/lib/TRD/Velocity.pm line 142. > # Compilation failed in require at t/00-load.t line 6. > # BEGIN failed--compilation aborted at t/00-load.t line 6. > # Testing TRD::Velocity , Perl 5.025004, /bbbike/perl- > 5.25.4/bin/perl5.25.4 > # Looks like you failed 1 test of 1. > t/00-load.t ........ > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/1 subtests > > > See also http://matrix.cpantesters.org/?dist=TRD-Velocity%200.0.8
Applying a patch along the lines of the attachment should resolve the problem. Thank you very much. Jim Keenan
Subject: TRD-Velocity-unescaped-left-brace.diff
Only in blib/lib/: auto Only in blib/lib/TRD: .exists diff -u -r lib/TRD/Velocity.pm blib/lib/TRD/Velocity.pm --- lib/TRD/Velocity.pm 2010-08-08 19:33:16.000000000 -0400 +++ blib/lib/TRD/Velocity.pm 2016-12-20 11:03:08.402493981 -0500 @@ -139,9 +139,9 @@ } $contents = $self->tag_handler( $contents ); - $contents =~s/\${([\w\.-\[\]]+)}\.escape\(\)/$self->marge_val( $1. '.escape()' )/egos; - $contents =~s/\${([\w\.-\[\]]+)}\.unescape\(\)/$self->marge_val( $1. '.unescape()' )/egos; - $contents =~s/\${([\w\.-\[\]]+)}/$self->marge_val( $1 )/egos; + $contents =~s/\$\{([\w\.-\[\]]+)}\.escape\(\)/$self->marge_val( $1. '.escape()' )/egos; + $contents =~s/\$\{([\w\.-\[\]]+)}\.unescape\(\)/$self->marge_val( $1. '.unescape()' )/egos; + $contents =~s/\$\{([\w\.-\[\]]+)}/$self->marge_val( $1 )/egos; $contents; } @@ -282,7 +282,7 @@ my $cnt = 0; foreach my $item ( @datas ){ $buff = $str; - $buff =~s/\${$param1\./\${$param2\[$cnt\]\./g; + $buff =~s/\$\{$param1\./\${$param2\[$cnt\]\./g; $buff =~s/\$$param1\./\$$param2\[$cnt\]\./g; $contents .= $buff; $cnt ++;