CSS-Squish-0.10/0000700000175000017500000000000011465056204011505 5ustar tomtomCSS-Squish-0.10/Makefile.PL0000644000175000017500000000103011465055675013476 0ustar tomtomuse 5.008; use strict; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'CSS::Squish', ABSTRACT_FROM => 'lib/CSS/Squish.pm', VERSION_FROM => 'lib/CSS/Squish.pm', MIN_PERL_VERSION => 5.008, PREREQ_PM => { 'File::Spec' => 0, 'URI' => 0, 'URI::file' => 0, 'Scalar::Util' => 0, }, BUILD_REQUIRES => { 'Test::LongString' => 0, }, AUTHOR => 'Thomas Sibley ', ); CSS-Squish-0.10/README0000644000175000017500000000505611226155720012403 0ustar tomtomNAME CSS::Squish - Compact many CSS files into one big file SYNOPSIS use CSS::Squish; my $concatenated = CSS::Squish->concatenate(@files); DESCRIPTION This module takes a list of CSS files and concatenates them, making sure to honor any valid @import statements included in the files. Following the CSS 2.1 spec, @import statements must be the first rules in a CSS file. Media-specific @import statements will be honored by enclosing the included file in an @media rule. This has the side effect of actually *improving* compatibility in Internet Explorer, which ignores media-specific @import rules but understands @media rules. It is possible that feature versions will include methods to compact whitespace and other parts of the CSS itself, but this functionality is not supported at the current time. METHODS CSS::Squish->concatenate(@files) Takes a list of files to concatenate and returns the results as one big scalar. CSS::Squish->concatenate_to($dest, @files) Takes a filehandle to print to and a list of files to concatenate. "concatenate" uses this method with an "open"ed scalar. CSS::Squish->roots(@dirs) A getter/setter for additional paths to search when looking for imported files. The paths specified here are searched _before_ trying to find the import relative to the file from which it is imported. This is useful if your server has multiple document roots from which your CSS imports files and lets you override the default behaviour (but still fall back to it). BUGS AND SHORTCOMINGS At the current time, comments are not skipped. This means comments happening before @import statements at the top of a file will cause the @import rules to not be parsed. Make sure the @import rules are the very first thing in the file (and only one per line). Only direct @import loops (i.e. where a file imports itself) are checked and skipped. It's easy enough to get this module in a loop. Don't do it. As of now, server-relative URLs (instead of file-relative URLs) will not work correctly. All other bugs should be reported via or bug-CSS-Squish@rt.cpan.org. AUTHOR Thomas Sibley COPYRIGHT AND LICENSE Copyright (c) 2006. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available. CSS-Squish-0.10/lib/0000700000175000017500000000000011465056204012253 5ustar tomtomCSS-Squish-0.10/lib/CSS/0000700000175000017500000000000011465056204012703 5ustar tomtomCSS-Squish-0.10/lib/CSS/Squish.pm0000644000175000017500000003145011465055736014543 0ustar tomtomuse 5.008; use strict; use warnings; package CSS::Squish; $CSS::Squish::VERSION = '0.10'; # Setting this to true will enable lots of debug logging about what # CSS::Squish is doing $CSS::Squish::DEBUG = 0; use File::Spec; use Scalar::Util qw(blessed); use URI; use URI::file; =head1 NAME CSS::Squish - Compact many CSS files into one big file =head1 SYNOPSIS use CSS::Squish; my $concatenated = CSS::Squish->concatenate(@files); my $squisher = CSS::Squish->new( roots => ['/root1', '/root2'] ); my $concatenated = $squisher->concatenate(@files); =head1 DESCRIPTION This module takes a list of CSS files and concatenates them, making sure to honor any valid @import statements included in the files. The benefit of this is that you get to keep your CSS as individual files, but can serve it to users in one big file, saving the overhead of possibly dozens of HTTP requests. Following the CSS 2.1 spec, @import statements must be the first rules in a CSS file. Media-specific @import statements will be honored by enclosing the included file in an @media rule. This has the side effect of actually I compatibility in Internet Explorer, which ignores media-specific @import rules but understands @media rules. It is possible that future versions will include methods to compact whitespace and other parts of the CSS itself, but this functionality is not supported at the current time. =cut # # This should be a decently close CSS 2.1 compliant parser for @import rules # # XXX TODO: This does NOT deal with comments at all at the moment. Which # is sort of a problem. # my @ROOTS = qw( ); my @MEDIA_TYPES = qw(all aural braille embossed handheld print projection screen tty tv); my $MEDIA_TYPES = '(?:' . join('|', @MEDIA_TYPES) . ')'; my $MEDIA_LIST = qr/$MEDIA_TYPES(?:\s*,\s*$MEDIA_TYPES)*/; my $AT_IMPORT = qr/^\s* # leading whitespace \@import\s+ # @import (?:url\( # url( \s* # optional whitespace (?:"|')? # optional " or ' | # or (?:"|')) # " or ' (.+?) # the filename (?:(?:"|')? # optional " or ' \s* # optional whitespace \) # ) | # or (?:"|')) # " or ' (?:\s($MEDIA_LIST))? # the optional media list \; # finishing semi-colon \s*$ # trailing whitespace /x; =head1 COMMON METHODS =head2 new( [roots=>[...]] ) A constructor. For backward compatibility with versions prior to 0.06 you can still call everything as a class method, but should remember that roots are shared between all callers in this case. if you're using persistent environment (like mod_perl) then it's very recomended to use objects. =cut sub new { my $proto = shift; return bless {@_}, ref($proto) || $proto; } =head2 concatenate( @files ) Takes a list of files to concatenate and returns the results as one big scalar. =head2 concatenate_to( $dest, @files ) Takes a filehandle to print to and a list of files to concatenate. C uses this method with an Ced scalar. =cut sub concatenate { my $self = shift; my $string = ''; $self->_debug("Opening scalar as file"); open my $fh, '>', \$string or die "Can't open scalar as file! $!"; $self->concatenate_to($fh, @_); $self->_debug("Closing scalar as file"); close $fh; return $string; } sub concatenate_to { my $self = shift; my $dest = shift; $self->_debug("Looping over list of files: ", join(", ", @_), "\n"); my %seen = (); while ( my $file = shift @_ ) { next if $seen{ $file }{'all'}++; my $fh = $self->file_handle( $file ); unless ( defined $fh ) { $self->_debug("Skipping '$file'..."); print $dest qq[/* WARNING: Unable to find/open file '$file' */\n]; next; } $self->_concatenate_to( $dest, $fh, $file, \%seen ); } } sub _concatenate_to { my $self = shift; my $dest = shift; my $fh = shift; my $file = shift; my $seen = shift || {}; while ( my $line = <$fh> ) { if ( $line =~ /$AT_IMPORT/o ) { my $import = $1; my $media = $2; $self->_debug("Processing import '$import'"); # resolve URI against the current file and get the file path # which is always relative to our root(s) my $path = $self->resolve_uri( $import, $file ); unless ( defined $path ) { $self->_debug("Skipping import because couldn't resolve URL"); print $dest $line; next; } if ( $seen->{ $path }{'all'} ) { $self->_debug("Skipping import as it was included for all media types"); print $dest "/** Skipping: \n", $line, " */\n\n"; next; } if ( $media ) { my @list = sort map lc, split /\s*,\s*/, ($media||''); if ( grep $_ eq 'all', @list ) { @list = (); } $media = join ', ', @list; } if ( $seen->{ $path }{ $media || 'all' }++ ) { $self->_debug("Skipping import as it's recursion"); print $dest "/** Skipping: \n", $line, " */\n\n"; next; } # Look up the new file in root(s), so we can leave import # if something is wrong my $new_fh = $self->file_handle( $path ); unless ( defined $new_fh ) { $self->_debug("Skipping import of '$import'"); print $dest qq[/* WARNING: Unable to find import '$import' */\n]; print $dest $line; next; } print $dest "\n/**\n * From $file: $line */\n\n"; if ( defined $media ) { print $dest "\@media $media {\n"; $self->_concatenate_to($dest, $new_fh, $path, $seen); print $dest "}\n"; } else { $self->_concatenate_to($dest, $new_fh, $path, $seen); } print $dest "\n/** End of $import */\n\n"; } else { print $dest $line; last if not $line =~ /^\s*$/; } } $self->_debug("Printing the rest"); local $_; print $dest $_ while <$fh>; close $fh; } =head1 RESOLVING METHODS The following methods help map URIs to files and find them on the disk. In common situation you control CSS and can adopt it to use imports with relative URIs and most probably only have to set root(s). However, you can subclass these methods to parse css files before submitting, implement advanced mapping of URIs to file system and other things. Mapping works in the following way. When you call concatenate method we get content of file using file_handle method which as well lookup files in roots. If roots are not defined then files are treated as absolute paths or relative to the current directory. Using of absolute paths is not recommended as unhide server dirrectory layout to clients in css comments and as well don't allow to handle @import commands with absolute URIs. When files is found we parse its content for @import commands. On each URI we call resolve_uri method that convert absolute and relative URIs into file paths. Here is example of processing: roots: /www/overlay/, /www/shared/ $squisher->concatenate('/css/main.css'); ->file_handle('/css/main.css'); ->resolve_file('/css/main.css'); <- '/www/shared/css/main.css'; <- handle; content parsing find '@import url(nav.css)' -> resolve_uri('nav.css', '/css/main.css'); <- '/css/nav.css'; ... recursivly process file find '@import url(/css/another.css)' -> resolve_uri('/css/another.css', '/css/main.css'); <- '/css/another.css' ... =head2 roots( @dirs ) A getter/setter for paths to search when looking for files. The paths specified here are searched for files. This is useful if your server has multiple document roots or document root doesn't match the current dir. See also 'resolve_file' below. =cut sub roots { my $self = shift; my @res; unless ( blessed $self ) { @ROOTS = @_ if @_; @res = @ROOTS; } else { $self->{'roots'} = [ grep defined, @_ ] if @_; @res = @{ $self->{'roots'} }; } $self->_debug("Roots are: ". join ", ", map "'$_'", @res); return @res; } =head2 file_handle( $file ) Takes a path to a file, resolves (see resolve_file) it and returns a handle. Returns undef if file couldn't be resolved or it's impossible to open file. You can subclass it to filter content, process it with templating system or generate it on the fly: package My::CSS::Squish; use base qw(CSS::Squish); sub file_handle { my $self = shift; my $file = shift; my $content = $self->my_prepare_content($file); return undef unless defined $content; open my $fh, "<", \$content or warn "Couldn't open handle: $!"; return $fh; } B that the file is not resolved yet and is relative to the root(s), so you have to resolve it yourself or call resolve_file method. =cut sub file_handle { my $self = shift; my $file = shift; my $path = $self->resolve_file( $file ); unless ( defined $path ) { $self->_debug("Couldn't find '$file' in root(s)"); return undef; } my $fh; unless ( open $fh, '<', $path ) { $self->_debug("Skipping '$file' ($path) due to error: $!"); return undef; } return $fh; } =head2 resolve_file( $file ) Lookup file in the root(s) and returns first path it found or undef. When roots are not set just checks if file exists. =cut sub resolve_file { my $self = shift; my $file = shift; $self->_debug("Looking for '$file'"); my @roots = $self->roots; unless ( @roots ) { return undef unless -e $file; return $file; } foreach my $root ( @roots ) { $self->_debug("Searching in '$root'"); my @spec = File::Spec->splitpath( $root, 1 ); my $path = File::Spec->catpath( @spec[0,1], $file ); return $path if -e $path; } return undef; } =head2 _resolve_file( $file, @roots ) DEPRECATED. This private method is deprecated and do nothing useful except maintaining backwards compatibility. If you were using it then most probably to find files in roots before submitting them into concatenate method. Now, it's not required and this method returns back file path without changes. =cut sub _resolve_file { my ($self, $file, @roots) = @_; require Carp; Carp::carp("You called ->_resolve_file($file, ...). The method is deprecated!"); return $file; } =head2 resolve_uri( $uri_string, $base_file ) Takes an URI and base file path and transforms it into new file path. =cut sub resolve_uri { my $self = shift; my $uri_str = shift; my $base_file = shift; my $uri = URI->new( $uri_str, 'http' ); if ( defined $uri->scheme || defined $uri->authority ) { $self->_debug("Skipping uri because it's external"); return undef; } my $strip_leading_slash = 0; unless ( $base_file =~ m{^/} ) { $base_file = '/'. $base_file; $strip_leading_slash = 1; } my $base_uri = URI::file->new( $base_file ); my $path = $uri->abs( $base_uri )->path; $path =~ s{^/}{} if $strip_leading_slash; return $path; } sub _debug { my $self = shift; warn( ( caller(1) )[3], ": ", @_, "\n") if $CSS::Squish::DEBUG; } =head1 BUGS AND SHORTCOMINGS At the current time, comments are not skipped. This means comments happening before @import statements at the top of a file will cause the @import rules to not be parsed. Make sure the @import rules are the very first thing in the file (and only one per line). Processing of @import rules stops as soon as the first line that doesn't match an @import rule is encountered. All other bugs should be reported via L or L. =head1 AUTHOR Thomas Sibley , Ruslan Zakirov =head1 COPYRIGHT AND LICENSE Copyright (c) 2006. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available. =cut 1; CSS-Squish-0.10/META.yml0000600000175000017500000000121111465056204012753 0ustar tomtom--- #YAML:1.0 name: CSS-Squish version: 0.10 abstract: Compact many CSS files into one big file author: - Thomas Sibley license: unknown distribution_type: module configure_requires: ExtUtils::MakeMaker: 0 build_requires: Test::LongString: 0 requires: File::Spec: 0 perl: 5.008 Scalar::Util: 0 URI: 0 URI::file: 0 no_index: directory: - t - inc generated_by: ExtUtils::MakeMaker version 6.56 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 CSS-Squish-0.10/t/0000700000175000017500000000000011465056204011750 5ustar tomtomCSS-Squish-0.10/t/01-basic.t0000644000175000017500000000062211226155720013444 0ustar tomtom#!/usr/bin/perl -w use strict; use warnings; use Test::More tests => 2; use_ok("CSS::Squish"); my $expected_result = <<'EOT'; /** * From t/css/01-basic.css: @import "01-basic-import.css"; */ inside 01-basic-import.css /** End of 01-basic-import.css */ body { color: blue; } EOT my $result = CSS::Squish->concatenate('t/css/01-basic.css'); is($result, $expected_result, "Basic import"); CSS-Squish-0.10/t/07-basic-extra-roots.t0000644000175000017500000000134711226155720015744 0ustar tomtom#!/usr/bin/perl -w use strict; use warnings; use Test::More tests => 2; use Test::LongString; use_ok("CSS::Squish"); my $expected_result = <<'EOT'; /** * From 07-basic-extra-roots.css: @import "07-basic-extra-roots2.css"; */ foobar /** End of 07-basic-extra-roots2.css */ /** * From 07-basic-extra-roots.css: @import "07-basic-extra-roots3.css"; */ foobaz /** End of 07-basic-extra-roots3.css */ /** * From 07-basic-extra-roots.css: @import "07-basic-extra-roots4.css"; */ fallback /** End of 07-basic-extra-roots4.css */ blam EOT CSS::Squish->roots( 't/css2/', 't/css3/', 't/css/' ); my $result = CSS::Squish->concatenate('07-basic-extra-roots.css'); is_string($result, $expected_result, "Basic extra roots"); CSS-Squish-0.10/t/99-pod.t0000644000175000017500000000020211226155720013160 0ustar tomtomuse Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); CSS-Squish-0.10/t/99-pod-coverage.t0000644000175000017500000000077111226155720014764 0ustar tomtomuse Test::More; eval "use Test::Pod::Coverage 1.00"; plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@; all_pod_coverage_ok( ); # Workaround for dumb bug (fixed in 5.8.7) where Test::Builder thinks that # certain "die"s that happen inside evals are not actually inside evals, # because caller() is broken if you turn on $^P like Module::Refresh does # # (I mean, if we've gotten to this line, then clearly the test didn't die, no?) Test::Builder->new->{Test_Died} = 0; CSS-Squish-0.10/t/03-skip-http.t0000644000175000017500000000044011226155720014306 0ustar tomtom#!/usr/bin/perl -w use strict; use warnings; use Test::More tests => 2; use_ok("CSS::Squish"); my $expected = <<'EOT'; @import url("http://example.com/foo.css"); foobar EOT my $result = CSS::Squish->concatenate('t/css/03-skip-http.css'); is($result, $expected, "Skip remote URLs"); CSS-Squish-0.10/t/05-basic-loop-prevention.t0000644000175000017500000000054211226155720016607 0ustar tomtom#!/usr/bin/perl -w use strict; use warnings; use Test::More tests => 2; use Test::LongString; use_ok("CSS::Squish"); my $expected = <<'EOT'; /** Skipping: @import "05-loop-prevention.css"; */ foobar EOT my $result = CSS::Squish->concatenate('t/css/05-loop-prevention.css'); is_string($result, $expected, "Skip direct loop-causing imports"); CSS-Squish-0.10/t/css2/0000700000175000017500000000000011465056204012622 5ustar tomtomCSS-Squish-0.10/t/css2/07-basic-extra-roots2.css0000644000175000017500000000000711226155720017215 0ustar tomtomfoobar CSS-Squish-0.10/t/css/0000700000175000017500000000000011465056204012540 5ustar tomtomCSS-Squish-0.10/t/css/01-basic.css0000644000175000017500000000006711226155720014564 0ustar tomtom @import "01-basic-import.css"; body { color: blue; } CSS-Squish-0.10/t/css/blam.css0000644000175000017500000000000611226155720014171 0ustar tomtomBlam! CSS-Squish-0.10/t/css/03-skip-http.css0000644000175000017500000000006211226155720015423 0ustar tomtom@import url("http://example.com/foo.css"); foobar CSS-Squish-0.10/t/css/foo2.css0000644000175000017500000000000511226155720014122 0ustar tomtomfoo2 CSS-Squish-0.10/t/css/05-loop-prevention.css0000644000175000017500000000005211226155720016641 0ustar tomtom @import "05-loop-prevention.css"; foobar CSS-Squish-0.10/t/css/foo/0000700000175000017500000000000011465056204013323 5ustar tomtomCSS-Squish-0.10/t/css/foo/04-recursion-3.css0000644000175000017500000000001011226155720016426 0ustar tomtomlevel 3 CSS-Squish-0.10/t/css/foo/04-recursion-2.css0000644000175000017500000000004611226155720016436 0ustar tomtom@import "04-recursion-3.css"; level 2 CSS-Squish-0.10/t/css/05-loop-prevention-2.css0000644000175000017500000000005111226155720016777 0ustar tomtom@import "05-loop-prevention-3.css"; main CSS-Squish-0.10/t/css/04-recursion.css0000644000175000017500000000005111226155720015510 0ustar tomtom@import "foo/04-recursion-2.css"; foobar CSS-Squish-0.10/t/css/01-basic-import.css0000644000175000017500000000003311226155720016065 0ustar tomtominside 01-basic-import.css CSS-Squish-0.10/t/css/07-basic-extra-roots3.css0000644000175000017500000000001011226155720017126 0ustar tomtomnotthis CSS-Squish-0.10/t/css/foo.css0000644000175000017500000000000511226155720014040 0ustar tomtomfoo1 CSS-Squish-0.10/t/css/05-loop-prevention-3.css0000644000175000017500000000005511226155720017004 0ustar tomtom@import "05-loop-prevention-2.css"; import 2 CSS-Squish-0.10/t/css/07-basic-extra-roots4.css0000644000175000017500000000001111226155720017130 0ustar tomtomfallback CSS-Squish-0.10/t/css/02-edge-cases.css0000644000175000017500000000030611226155720015500 0ustar tomtom @import "blam.css" print; @import "blam.css"; @import url( "foo.css") print,aural; @import url(foo2.css ) print, aural, tty; @import 'failure.css' print; fjkls jk @import url("foo.css"); last CSS-Squish-0.10/t/css/07-basic-extra-roots.css0000644000175000017500000000016611226155720017057 0ustar tomtom @import "07-basic-extra-roots2.css"; @import "07-basic-extra-roots3.css"; @import "07-basic-extra-roots4.css"; blam CSS-Squish-0.10/t/06-server-relative-urls.t0000644000175000017500000000052211226155720016471 0ustar tomtom#!/usr/bin/perl -w use strict; use warnings; use Test::More skip_all => "Functionality non-existant. (and tests incomplete.)"; use Test::LongString; use_ok("CSS::Squish"); my $expect = <<'EOT'; EOT my $result = CSS::Squish->concatenate('t/css/06-server-relative-urls.t'); is_string($result, $expect, "Server-relative URLs work"); CSS-Squish-0.10/t/css3/0000700000175000017500000000000011465056204012623 5ustar tomtomCSS-Squish-0.10/t/css3/07-basic-extra-roots3.css0000644000175000017500000000000711226155720017217 0ustar tomtomfoobaz CSS-Squish-0.10/t/css3/07-basic-extra-roots2.css0000644000175000017500000000001011226155720017210 0ustar tomtomnotthis CSS-Squish-0.10/t/04-recursion.t0000644000175000017500000000075511226155720014406 0ustar tomtom#!/usr/bin/perl -w use strict; use warnings; use Test::More tests => 2; use_ok("CSS::Squish"); my $expected = <<'EOT'; /** * From t/css/04-recursion.css: @import "foo/04-recursion-2.css"; */ /** * From t/css/foo/04-recursion-2.css: @import "04-recursion-3.css"; */ level 3 /** End of 04-recursion-3.css */ level 2 /** End of foo/04-recursion-2.css */ foobar EOT my $result = CSS::Squish->concatenate('t/css/04-recursion.css'); is($result, $expected, "Recursive import"); CSS-Squish-0.10/t/00-use.t0000644000175000017500000000013711226155720013157 0ustar tomtom#!/usr/bin/perl use strict; use warnings; use Test::More tests => 1; use_ok("CSS::Squish"); CSS-Squish-0.10/t/02-edge-cases.t0000644000175000017500000000224311316216073014364 0ustar tomtom#!/usr/bin/perl -w use strict; use warnings; use Test::More tests => 3; use Test::LongString; use_ok("CSS::Squish"); my $expected_result = <<'EOT'; /** * From t/css/02-edge-cases.css: @import "blam.css" print; */ @media print { Blam! } /** End of blam.css */ /** * From t/css/02-edge-cases.css: @import "blam.css"; */ Blam! /** End of blam.css */ /** * From t/css/02-edge-cases.css: @import url( "foo.css") print,aural; */ @media aural, print { foo1 } /** End of foo.css */ /** * From t/css/02-edge-cases.css: @import url(foo2.css ) print, aural, tty; */ @media aural, print, tty { foo2 } /** End of foo2.css */ /* WARNING: Unable to find import 'failure.css' */ @import 'failure.css' print; fjkls jk @import url("foo.css"); last EOT my $result = CSS::Squish->concatenate('t/css/02-edge-cases.css'); is_string($result, $expected_result, "Edge cases"); # bug in version 0.08 and older, result was error: # Modification of a read-only value attempted # at lib/CSS/Squish.pm line 220 for ('t/css/02-edge-cases.css') { $result = CSS::Squish->concatenate( $_ ); } is_string($result, $expected_result, "no 'Modification of a read-only value'"); CSS-Squish-0.10/MANIFEST0000644000175000017500000000151511465056204012652 0ustar tomtomCHANGES lib/CSS/Squish.pm Makefile.PL MANIFEST This list of files README t/00-use.t t/01-basic.t t/02-edge-cases.t t/03-skip-http.t t/04-recursion.t t/05-basic-loop-prevention.t t/06-server-relative-urls.t t/07-basic-extra-roots.t t/99-pod-coverage.t t/99-pod.t t/css/01-basic-import.css t/css/01-basic.css t/css/02-edge-cases.css t/css/03-skip-http.css t/css/04-recursion.css t/css/05-loop-prevention-2.css t/css/05-loop-prevention-3.css t/css/05-loop-prevention.css t/css/07-basic-extra-roots.css t/css/07-basic-extra-roots3.css t/css/07-basic-extra-roots4.css t/css/blam.css t/css/foo.css t/css/foo/04-recursion-2.css t/css/foo/04-recursion-3.css t/css/foo2.css t/css2/07-basic-extra-roots2.css t/css3/07-basic-extra-roots2.css t/css3/07-basic-extra-roots3.css META.yml Module meta-data (added by MakeMaker) CSS-Squish-0.10/CHANGES0000644000175000017500000000231411226155720012510 0ustar tomtomRevision history for Perl extension CSS::Squish. 0.08 Mon Apr 20 2009 * module doesn't work on perl 5.6.x and older * update docs 0.07 Fri Nov 9 2007 * add back _resolve_file which has been deprecated, to make the module backward compatible for users of that method 0.06 Tue Nov 4 2007 * INCOMPATIBLE CHANGE Multiple roots are treated in a different way, read more in the doc. * Make things more extendable * Docs updates * The follwoing bugs are fixed: Only direct @import loops (i.e. where a file imports itself) are checked and skipped. It's easy enough to get this module in a loop. Don't do it. As of now, server-relative URLs (instead of file-relative URLs) will not work correctly. 0.05 Tue Jul 4 2006 * INCOMPATIBLE CHANGE CSS::Squish now searches the user-specified roots _before_ searching relative to the importing file. This seems to make more sense in general and allows overriding the default behaviour more easily. For users not using the multiple roots functionality, behaviour has not changed. 0.02 Wed Jun 7 2006 * Fixed POD and added another bug note 0.01 Wed Jun 7 2006