Skip Menu |

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

Report information
The Basics
Id: 85896
Status: resolved
Priority: 0/
Queue: CSS-Minifier-XS

People
Owner: GTERMARS [...] cpan.org
Requestors: michael [...] bizsystems.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.08
Fixed in: 0.09



Subject: fails to build on distros using perl less than 5.8.8
CSS::Minifier::XS fails to build for most *nix distros running Apache 1.x and mod_perl 1 simple patch backports for perl 5.6.1 an earlier, patch submitted to author September 2012. Attached again here for anyone facing similar issues with development on older systems. 4 lines that require perl 5.8.8 removed 3 lines in XS.xs substitute Newz for Newxz allows this module to be used on all current and most older *nix distros still running.
Subject: backportCSSMinifier.diff
diff -ru ../CSS-Minifier-XS-0.08/Build.PL ./Build.PL --- ../CSS-Minifier-XS-0.08/Build.PL Tue Nov 2 22:29:11 2010 +++ ./Build.PL Wed Jun 5 10:39:10 2013 @@ -10,9 +10,6 @@ 'xs_files' => { 'XS.xs' => 'lib/CSS/Minifier/XS.xs', }, - 'requires' => { - 'perl' => '5.8.8', - }, 'build_requires' => { 'Test::More' => 0, }, diff -ru ../CSS-Minifier-XS-0.08/Changes ./Changes --- ../CSS-Minifier-XS-0.08/Changes Tue Nov 2 22:29:11 2010 +++ ./Changes Wed Jun 5 10:48:23 2013 @@ -1,5 +1,12 @@ Revision history for Perl extension CSS::Minifier::XS. +0.09 Sat Sep 22, 10:47:41 PDT 2012 + - reduce perl requirement to 5.6.1 (tested) and possibly older (untested) + for platforms running Apache 1.x and mod_perl 1 + 4 lines removed (require perl5.8.x) + 3 lines changes (substitute Newz for Newxz) + miker@cpan.org + 0.08 Tue Nov 2 22:25 PDT 2010 - Bump Perl requirement to 5.8.8; oldest release with Newxz() diff -ru ../CSS-Minifier-XS-0.08/Makefile.PL ./Makefile.PL --- ../CSS-Minifier-XS-0.08/Makefile.PL Tue Nov 2 22:29:11 2010 +++ ./Makefile.PL Wed Jun 5 10:37:48 2013 @@ -1,5 +1,4 @@ # Note: this file was auto-generated by Module::Build::Compat version 0.35 -require 5.8.8; use ExtUtils::MakeMaker; WriteMakefile ( Only in ./: Makefile.old diff -ru ../CSS-Minifier-XS-0.08/XS.xs ./XS.xs --- ../CSS-Minifier-XS-0.08/XS.xs Tue Nov 2 22:29:11 2010 +++ ./XS.xs Sat Sep 22 11:54:10 2012 @@ -168,7 +168,7 @@ /* allocates a new node */ Node* CssAllocNode() { Node* node; - Newxz(node, 1, Node); + Newz(0,node, 1, Node); node->prev = NULL; node->next = NULL; node->contents = NULL; @@ -205,7 +205,7 @@ CssClearNodeContents(node); node->length = len; /* allocate string, fill with NULLs, and copy */ - Newxz(node->contents, (len+1), char); + Newz(0,node->contents, (len+1), char); strncpy( node->contents, string, len ); } @@ -537,7 +537,7 @@ /* allocate the result buffer to the same size as the original CSS; in * a worst case scenario that's how much memory we'll need for it. */ - Newxz(results, (strlen(string)+1), char); + Newz(0,results, (strlen(string)+1), char); ptr = results; /* copy node contents into result buffer */ curr = head; Only in ./: backportCSSMinifier.diff diff -ru ../CSS-Minifier-XS-0.08/lib/CSS/Minifier/XS.pm ./lib/CSS/Minifier/XS.pm --- ../CSS-Minifier-XS-0.08/lib/CSS/Minifier/XS.pm Tue Nov 2 22:29:11 2010 +++ ./lib/CSS/Minifier/XS.pm Wed Jun 5 10:37:59 2013 @@ -1,6 +1,5 @@ package CSS::Minifier::XS; -use 5.8.8; use strict; use warnings;
Resolved in v0.09, where we should now be able to build successfully on older Perls. If you have troubles building this release, please open a new ticket and tie it to the v0.09 release.