r62786 - in /branches/upstream/libcss-tiny-perl/current: Changes MANIFEST META.yml Makefile.PL README lib/CSS/Tiny.pm t/04_rt.t

angelabad-guest at users.alioth.debian.org angelabad-guest at users.alioth.debian.org
Tue Sep 21 23:39:30 UTC 2010


Author: angelabad-guest
Date: Tue Sep 21 23:39:22 2010
New Revision: 62786

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=62786
Log:
[svn-upgrade] new version libcss-tiny-perl (1.19)

Added:
    branches/upstream/libcss-tiny-perl/current/t/04_rt.t
Modified:
    branches/upstream/libcss-tiny-perl/current/Changes
    branches/upstream/libcss-tiny-perl/current/MANIFEST
    branches/upstream/libcss-tiny-perl/current/META.yml
    branches/upstream/libcss-tiny-perl/current/Makefile.PL
    branches/upstream/libcss-tiny-perl/current/README
    branches/upstream/libcss-tiny-perl/current/lib/CSS/Tiny.pm

Modified: branches/upstream/libcss-tiny-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcss-tiny-perl/current/Changes?rev=62786&op=diff
==============================================================================
--- branches/upstream/libcss-tiny-perl/current/Changes (original)
+++ branches/upstream/libcss-tiny-perl/current/Changes Tue Sep 21 23:39:22 2010
@@ -1,4 +1,13 @@
 Revision history for Perl extension CSS-Tiny
+
+1.19 Fri  3 Sep 2010
+	- No functional changes
+	- Resolved RT #59037: CSS::Tiny reorders rules
+	- The use of Tie::IxHash to achieve ordering is now documented
+
+1.18 Fri  3 Sep 2010
+	- Resolved RT #60776: Parsing of multiple whitespace selectors
+	- Added test script specifically for RT regression tests
 
 1.17 Sun  4 Jul 2010
 	- Removed the use of Module::Install

Modified: branches/upstream/libcss-tiny-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcss-tiny-perl/current/MANIFEST?rev=62786&op=diff
==============================================================================
--- branches/upstream/libcss-tiny-perl/current/MANIFEST (original)
+++ branches/upstream/libcss-tiny-perl/current/MANIFEST Tue Sep 21 23:39:22 2010
@@ -7,6 +7,7 @@
 t/01_compile.t
 t/02_main.t
 t/03_inline_clone.t
+t/04_rt.t
 test.css
 xt/meta.t
 xt/pmv.t

Modified: branches/upstream/libcss-tiny-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcss-tiny-perl/current/META.yml?rev=62786&op=diff
==============================================================================
--- branches/upstream/libcss-tiny-perl/current/META.yml (original)
+++ branches/upstream/libcss-tiny-perl/current/META.yml Tue Sep 21 23:39:22 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               CSS-Tiny
-version:            1.17
+version:            1.19
 abstract:           Read/Write .css files with as little code as possible
 author:
     - Adam Kennedy <adamk at cpan.org>

Modified: branches/upstream/libcss-tiny-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcss-tiny-perl/current/Makefile.PL?rev=62786&op=diff
==============================================================================
--- branches/upstream/libcss-tiny-perl/current/Makefile.PL (original)
+++ branches/upstream/libcss-tiny-perl/current/Makefile.PL Tue Sep 21 23:39:22 2010
@@ -2,7 +2,7 @@
 use vars qw{$VERSION};
 BEGIN {
 	require 5.004;
-	$VERSION = '1.17';
+	$VERSION = '1.19';
 }
 use ExtUtils::MakeMaker;
 

Modified: branches/upstream/libcss-tiny-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcss-tiny-perl/current/README?rev=62786&op=diff
==============================================================================
--- branches/upstream/libcss-tiny-perl/current/README (original)
+++ branches/upstream/libcss-tiny-perl/current/README Tue Sep 21 23:39:22 2010
@@ -131,6 +131,23 @@
     When an error occurs, you can retrieve the error message either from the
     $CSS::Tiny::errstr variable, or using the "errstr" method.
 
+CAVEATS
+  CSS Rule Order
+    While the order of rules in CSS is important, this is one of the
+    features that is sacrificed to keep things small and dependency-free. If
+    you need to preserve order yourself, we recommend that you upgrade to
+    the more powerful CSS module.
+
+    If this is not possible in your case, alternatively it can be done with
+    the help of another module such as Tie::IxHash:
+
+        my $css = CSS::Tiny->new;
+        tie %$css, 'Tie::IxHash';
+        $css->read('style.css');
+
+    Note: You will also need to remember to add the additional dependency to
+    your code or module in this case.
+
 SUPPORT
     Bugs should be reported via the CPAN bug tracker at
 

Modified: branches/upstream/libcss-tiny-perl/current/lib/CSS/Tiny.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcss-tiny-perl/current/lib/CSS/Tiny.pm?rev=62786&op=diff
==============================================================================
--- branches/upstream/libcss-tiny-perl/current/lib/CSS/Tiny.pm (original)
+++ branches/upstream/libcss-tiny-perl/current/lib/CSS/Tiny.pm Tue Sep 21 23:39:22 2010
@@ -5,7 +5,7 @@
 use strict;
 BEGIN {
 	require 5.004;
-	$CSS::Tiny::VERSION = '1.17';
+	$CSS::Tiny::VERSION = '1.19';
 	$CSS::Tiny::errstr  = '';
 }
 
@@ -47,13 +47,14 @@
 		}
 
 		# Split in such a way as to support grouped styles
-		my $style = $1;
+		my $style      = $1;
+		my $properties = $2;
 		$style =~ s/\s{2,}/ /g;
 		my @styles = grep { s/\s+/ /g; 1; } grep { /\S/ } split /\s*,\s*/, $style;
 		foreach ( @styles ) { $self->{$_} ||= {} }
 
 		# Split into properties
-		foreach ( grep { /\S/ } split /\;/, $2 ) {
+		foreach ( grep { /\S/ } split /\;/, $properties ) {
 			unless ( /^\s*([\w._-]+)\s*:\s*(.*?)\s*$/ ) {
 				return $self->_error( "Invalid or unexpected property '$_' in style '$style'" );
 			}
@@ -284,6 +285,25 @@
 When an error occurs, you can retrieve the error message either from the
 C<$CSS::Tiny::errstr> variable, or using the C<errstr> method.
 
+=head1 CAVEATS
+
+=head2 CSS Rule Order
+
+While the order of rules in CSS is important, this is one of the features
+that is sacrificed to keep things small and dependency-free. If you need
+to preserve order yourself, we recommend that you upgrade to the more
+powerful L<CSS> module.
+
+If this is not possible in your case, alternatively it can be done with the
+help of another module such as L<Tie::IxHash>:
+
+    my $css = CSS::Tiny->new;
+    tie %$css, 'Tie::IxHash';
+    $css->read('style.css');
+
+Note: You will also need to remember to add the additional dependency to
+your code or module in this case.
+
 =head1 SUPPORT
 
 Bugs should be reported via the CPAN bug tracker at

Added: branches/upstream/libcss-tiny-perl/current/t/04_rt.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcss-tiny-perl/current/t/04_rt.t?rev=62786&op=file
==============================================================================
--- branches/upstream/libcss-tiny-perl/current/t/04_rt.t (added)
+++ branches/upstream/libcss-tiny-perl/current/t/04_rt.t Tue Sep 21 23:39:22 2010
@@ -1,0 +1,37 @@
+#!/usr/bin/perl
+
+# This test holds regression tests based on samples provided in various
+# rt.cpan.org bug reports.
+
+use strict;
+BEGIN {
+	$|  = 1;
+	$^W = 1;
+}
+
+use Test::More tests => 2;
+use CSS::Tiny;
+
+
+
+
+
+######################################################################
+# Bug #60776 for CSS-Tiny: Bug in selector parsing in CSS::Tiny
+
+# Test parsing of CSS selectors with multiple whitespace elements
+my $css = CSS::Tiny->read_string( <<'END_CSS' );
+.test  .bodySettings  {
+  font-size:  12px;
+}
+END_CSS
+isa_ok( $css, 'CSS::Tiny' );
+is_deeply(
+	[ %$css ],
+	[
+		'.test .bodySettings' => {
+			'font-size' => '12px',
+		},
+	],
+	'Bug 60776: Parsing with multiple whitespace',
+);




More information about the Pkg-perl-cvs-commits mailing list