Skip Menu |
 

This queue is for tickets about the CSS-LESSp CPAN distribution.

Report information
The Basics
Id: 50274
Status: open
Priority: 0/
Queue: CSS-LESSp

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

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



Subject: Fails on all perls < 5.10
Download (untitled) / with headers
text/plain 340b
In case you haven't yet noticed, the matrix shows impressingly that your tests fail on all perls < 5.10: http://matrix.cpantesters.org/?dist=CSS-LESSp-0.03 It has to do with a percent sign in the line # height: 60%; This makes me very curious which incompatibility you have uncovered here. Please let me know when you find out. Thanks!
After a bisect that pointed me to patch fae667d (p4raw-id: //depot/perl@30104) I knew it would be a regex with alteration. With the following patch I made the tests pass on 5.8: --- ../CSS-LESSp-0.03-FiMxvF/lib/CSS/LESSp.pm 2009-10-01 08:20:11.000000000 +0200 +++ lib/CSS/LESSp.pm 2009-10-09 08:11:07.000000000 +0200 @@ -69,7 +69,7 @@ # expression (+,-,*,/) if ( $value =~ /(\d+)\s*(px|pt|em|%)*\s*(\+|\*|\/)\s*((\d+)\s*(px|pt|em|%)*|\d+)/ or $value =~ /(\d+)\s*(px|pt|em|%)*\s*(\-)\s+((\d+)\s*(px|pt|em|%)*|\d+)/ ) { my $eval = $value; - my $removed = $1 if $eval =~ s/(px|pt|em|%)//g; + my $removed; $removed = $1 if $eval =~ m/(px|pt|em|%)/; $eval =~ s/(px|pt|em|%)//g; if ( $eval !~ /[a-z]/i and $eval = eval($eval) ) { $eval .= "$removed" if $eval and $removed; $value = $eval; So here is an example to try out that works only since 5.10: my $eval = "35% "; print $1 if $eval =~ s/(x|%)//g; It prints '%' with 5.10 and nothing with 5.8. Thanks for the puzzle;)
Download (untitled) / with headers
text/plain 1.2k
On Fri Oct 09 02:26:55 2009, ANDK wrote: Show quoted text
> After a bisect that pointed me to patch fae667d (p4raw-id: > //depot/perl@30104) I knew it would be a regex with alteration. With > the following patch I made the tests pass on 5.8: > > --- ../CSS-LESSp-0.03-FiMxvF/lib/CSS/LESSp.pm 2009-10-01 > 08:20:11.000000000 +0200 > +++ lib/CSS/LESSp.pm 2009-10-09 08:11:07.000000000 +0200 > @@ -69,7 +69,7 @@ > # expression (+,-,*,/) > if ( $value =~ > /(\d+)\s*(px|pt|em|%)*\s*(\+|\*|\/)\s*((\d+)\s*(px|pt|em|%)*|\d+)/ or > $value =~ /(\d+)\s*(px|pt|em|%)*\s*(\-)\s+((\d+)\s*(px|pt|em|%)*|\d+)/ ) { > my $eval = $value; > - my $removed = $1 if $eval =~ s/(px|pt|em|%)//g; > + my $removed; $removed = $1 if $eval =~ m/(px|pt|em|%)/; $eval
=~ Show quoted text
> s/(px|pt|em|%)//g; > if ( $eval !~ /[a-z]/i and $eval = eval($eval) ) { > $eval .= "$removed" if $eval and $removed; > $value = $eval; > > > > So here is an example to try out that works only since 5.10: > > my $eval = "35% "; > print $1 if $eval =~ s/(x|%)//g; > > It prints '%' with 5.10 and nothing with 5.8. > > Thanks for the puzzle;)
I'll integrate the patch soon. Thanks for your help. I have no time recently to update this module... I'm glad real people are using it!


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.