r2866 - in /packages/libpar-perl/trunk: AUTHORS ChangeLog Makefile.PL SIGNATURE debian/changelog debian/control lib/PAR.pm lib/PAR/Filter/PatchContent.pm lib/PAR/Heavy.pm lib/PAR/Packer.pm script/par.pl script/pp t/2-pp.t t/30-current_exec.t

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Sun Jun 4 21:30:46 UTC 2006


Author: eloy
Date: Sun Jun  4 21:30:45 2006
New Revision: 2866

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=2866
Log:
eloy: new upstream version

Modified:
    packages/libpar-perl/trunk/AUTHORS
    packages/libpar-perl/trunk/ChangeLog
    packages/libpar-perl/trunk/Makefile.PL
    packages/libpar-perl/trunk/SIGNATURE
    packages/libpar-perl/trunk/debian/changelog
    packages/libpar-perl/trunk/debian/control
    packages/libpar-perl/trunk/lib/PAR.pm
    packages/libpar-perl/trunk/lib/PAR/Filter/PatchContent.pm
    packages/libpar-perl/trunk/lib/PAR/Heavy.pm
    packages/libpar-perl/trunk/lib/PAR/Packer.pm
    packages/libpar-perl/trunk/script/par.pl
    packages/libpar-perl/trunk/script/pp
    packages/libpar-perl/trunk/t/2-pp.t
    packages/libpar-perl/trunk/t/30-current_exec.t

Modified: packages/libpar-perl/trunk/AUTHORS
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/AUTHORS?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/AUTHORS (original)
+++ packages/libpar-perl/trunk/AUTHORS Sun Jun  4 21:30:45 2006
@@ -3,36 +3,36 @@
 patches or suggestions, or their bug reports or comments have inspired
 the appropriate patches.  Corrections, additions, deletions welcome:
 
-Abe Timmerman           (ABELTJE)
-Abhijit Menon-Sen       (AMS)
+Abe Timmerman                 (ABELTJE)
+Abhijit Menon-Sen             (AMS)
 Alan Stewart
 Alan Teague
-Alasdair Allan          (AALLAN)
+Alasdair Allan                (AALLAN)
 Alvin Belden
 Andrew Lee
 Andy Balaam
-Andy Lester             (PETDANCE)
+Andy Lester                   (PETDANCE)
 Antti Lankila
-Arthur Bergman          (ABERGMAN)
-Ask Bjoern Hansen       (ABH)
-Barrie Slaymaker        (RBS)
+Arthur Bergman                (ABERGMAN)
+Ask Bjoern Hansen             (ABH)
+Barrie Slaymaker              (RBS)
 Barry Jaspan
-Bill Atkins             (BATKINS)
+Bill Atkins                   (BATKINS)
 Brad Elliott
 Brigitte Jellinek
 Bruce Winter
-Chia-Liang Kao          (CLKAO)
-Chip Salzenberg         (CHIPS)
+Chia-Liang Kao                (CLKAO)
+Chip Salzenberg               (CHIPS)
 Chris Dolan
 Chris Williams
 Christian Schiefer
-Clayton O'Neill         (CMO)
+Clayton O'Neill               (CMO)
 Corey Goldberg
-Cosimo Streppone        (COSIMO)
+Cosimo Streppone              (COSIMO)
 D. Menzel
 Daniel Cohen-Laroque
-Daniel Shane            (DSHANE)
-Darek Adamkiewicz       (DADAMK)
+Daniel Shane                  (DSHANE)
+Darek Adamkiewicz             (DADAMK)
 David Dyck
 David Romano
 Doug Gruber
@@ -40,50 +40,53 @@
 Edward S. Peschko
 Edward Wildgoose
 Eric Paulson
-Gerald Richter          (GRICHTER)
-Germain Garand          (GGARAND)
+Gerald Richter                (GRICHTER)
+Germain Garand                (GGARAND)
 Glenn Mabbutt
 H. Wade Minter
-Henrique Dias           (HDIAS)
+Henrique Dias                 (HDIAS)
 Hirosi Taguti
 Iain Cass
-Iain Truskett           (SPOON)
-Ilya Zakharevich        (ILYAZ)
+Iain Truskett                 (SPOON)
+Ilya Zakharevich              (ILYAZ)
 Indy Singh
 Ivan Kudryavtsev
-Jan Dubois              (JDB)
-Jeff Goff               (JGOFF)
+James Muir
+Jan Dubois                    (JDB)
+Jeff Goff                     (JGOFF)
 Jerry Veldhuis
 Jesse Schoch
-Jesse Vincent           (JESSE)
-Jody Belka              (KNEW)
-Johan Lindstroem        (JOHANL)
+Jesse Vincent                 (JESSE)
+Jody Belka                    (KNEW)
+Johan Lindstroem              (JOHANL)
 John McMahon
-John Siracusa           (JSIRACUSA)
-Jonathan Leffler        (JOHNL)
+John Siracusa                 (JSIRACUSA)
+Jonathan Leffler              (JOHNL)
 Joseph Landman
-Jouke Visser            (JOUKE)
+Jouke Visser                  (JOUKE)
 Karl Forner
 Kieran J Broadfoot
 Lindsay Morris
 Luc Willems
 Malcolm Nooning
-Marcus Ramberg          (MRAMBERG)
+Marcus Ramberg                (MRAMBERG)
+Mark Shelor                   (MSHELOR)
 Markus Jansen
 Martin Fabiani
-Martin Hosken           (MHOSKEN)
-Matt Sergeant           (MSERGEANT)
-Matthew Braid           (MDBGRIZ)
+Martin Hosken                 (MHOSKEN)
+Matt Sergeant                 (MSERGEANT)
+Matthew Braid                 (MDBGRIZ)
 Matthew Riedel
-Mattia Barbon           (MBARBON)
+Mattia Barbon                 (MBARBON)
 Michael Goldberger
 Mike Campbell
-Mike Stok               (MIKESTOK)
+Mike Stok                     (MIKESTOK)
 Morbus Iff
-Murat Uenalan           (MUENALAN)
-Nathan Byrd             (NBYRD)
-Ned Konz                (NEDKONZ)
-Nicholas Clark          (NWCLARK)
+Murat Uenalan                 (MUENALAN)
+Nadim Ibn Hamouda El Khemir   (NKH)
+Nathan Byrd                   (NBYRD)
+Ned Konz                      (NEDKONZ)
+Nicholas Clark                (NWCLARK)
 Nicolas FROMENT
 Nomota KIM
 Paritosh Tyagi
@@ -93,36 +96,37 @@
 Patrick Whitney
 Phil Sallee
 Piotr Martyniuk
-PodMaster               (PODMASTER)
-Rafael Garcia-Suarez    (RGARCIA)
-Randal L. Schwartz      (MERLYN)
+PodMaster                     (PODMASTER)
+Rafael Garcia-Suarez          (RGARCIA)
+Randal L. Schwartz            (MERLYN)
 Randy Carpenter
-Randy W. Sims           (RANDYS)
+Randy W. Sims                 (RANDYS)
 Reini Urban
-Richard Soderberg       (RSOD)
+Richard Soderberg             (RSOD)
 Rick Fitzsimmons
-Rob Casey               (ROBAU)
+Rob Casey                     (ROBAU)
 Robert Allerstorfer
-Robert Creager          (RCREAGER)
+Robert Creager                (RCREAGER)
 Robert Wyrick
-Roderich Schupp         (RSCHUPP)
+Roderich Schupp               (RSCHUPP)
+Rong-En Fan
 Ryan Briones
 Sascha Wuestemann
 Sim Lim Hai
 Simon Andrews
-Simon Cozens            (SIMON)
+Simon Cozens                  (SIMON)
 Sisyphus
-Steffen Mueller         (SMUELLER)
-Steve Hay               (SHAY)
+Steffen Mueller               (SMUELLER)
+Steve Hay                     (SHAY)
 Stephen Pick
-TP Diffenbach
-Thomas Loo              (TLOO)
+Thomas Loo                    (TLOO)
 Thomas Rush
 Tim Conrow
-Tina Mueller            (TINITA)
+Tina Mueller                  (TINITA)
 Tom Pollard
 Tommy Butler
-Ton Hospel              (THOSPEL)
-Uri Guttman             (URI)
+Ton Hospel                    (THOSPEL)
+TP Diffenbach
+Uri Guttman                   (URI)
+Vincent Ladeuil
 Vladimir Yu. Tereshchenko
-Vincent Ladeuil

Modified: packages/libpar-perl/trunk/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/ChangeLog?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/ChangeLog (original)
+++ packages/libpar-perl/trunk/ChangeLog Sun Jun  4 21:30:45 2006
@@ -1,3 +1,27 @@
+
+[Changes for 0.94 - Jun  1, 2006]
+
+* New Features
+
+    - Added support for reading options to pp from a file using a
+      '@filename' argument to pp:  pp -o foo --gui @filename foo.pl
+
+* Bug fixes, etc.
+
+    - Workaround for a bug in Digest::SHA 5.38 and 5.39 that would prevent
+      PAR from being built.
+    - Fixed details in the 2-pp.t test file.
+    - Now recognizes text files that aren't picked up by the -T operator
+      but by the "file" tool.
+    - Applied Roderich Schupp's patch to 30-current_exec.t to fix a
+      path issue.
+    - Now requiring Module::ScanDeps 0.60 which fixes a couple of bugs
+      which might be observed as PAR bugs.
+    - Now working well with Spreadsheet::ParseExcel which uses an invalid
+      POD section to comment out a code block. This wasn't recognized by
+      PAR::Filter::PodStrip as POD and hence partly left in...
+    - If the output directory doesn't exist, we create it now and output
+      a meaningful error message if that failed.
 
 [Changes for 0.93 - May 19, 2006]
 

Modified: packages/libpar-perl/trunk/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/Makefile.PL?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/Makefile.PL (original)
+++ packages/libpar-perl/trunk/Makefile.PL Sun Jun  4 21:30:45 2006
@@ -10,8 +10,9 @@
 requires    'File::Temp'        => 0.05;
 requires    'Compress::Zlib'    => ($^O eq 'MSWin32') ? 1.16 : 1.30;
 requires    'Archive::Zip'      => 1.00;
-requires    'Module::ScanDeps'  => 0.56;
+requires    'Module::ScanDeps'  => 0.60;
 requires    'PAR::Dist'         => 0.08;
+requires    'Getopt::ArgvFile'  => 1.07;
 
 if ($^O eq 'MSWin32') {
     feature 'Windows --icon and --info support',

Modified: packages/libpar-perl/trunk/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/SIGNATURE?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/SIGNATURE (original)
+++ packages/libpar-perl/trunk/SIGNATURE Sun Jun  4 21:30:45 2006
@@ -14,12 +14,12 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 bbb9c28a3f4134a2353f4309f149be50d01f996b AUTHORS
-SHA1 321d01e2d12a22de83b7cf4ef5bae8edd1592ccd ChangeLog
+SHA1 ede400bfe0f648531df6cbfd9276639b9215c31c AUTHORS
+SHA1 7100aff65a2a7e4258ab8192f4cf5351699beead ChangeLog
 SHA1 6f2c475ec862243133e3d8dcc67db0290d0d6c2b MANIFEST
 SHA1 a425969945e62fcc7783784916d552d370b94951 MANIFEST.SKIP
 SHA1 032c78f3bc5ea42b592ec2773645e9620414da69 META.yml
-SHA1 bbf5c17a68d7756d3902dcdd7d6ac5a763d45903 Makefile.PL
+SHA1 1c6d02c0d334a245ccb83a3036a47b614b072ebb Makefile.PL
 SHA1 44d54db39e89f38c714e334a3174d51d4a12b6d9 README
 SHA1 aa8cd09fa1945de92b01d77b979b4c8769f148c2 TODO
 SHA1 5b59e5c9ef0fc0773ba431c3c171722cb677eda9 contrib/automated_pp_test/automated_pp_test.pl
@@ -54,16 +54,16 @@
 SHA1 a9037004a2c3096d77169a16da95743eeb813539 inc/Test/Builder/Module.pm
 SHA1 07c750f370de7a44ee7b0ed9ec30a7e89c24c9b9 inc/Test/More.pm
 SHA1 f2e051c0866a1e186ef57fe4360651fac64d858d lib/App/Packer/PAR.pm
-SHA1 641f80c560aa3e227b22e4be0abc98958b02da4f lib/PAR.pm
+SHA1 9a4f51b0d304dfbd70ca75aef3ca4537e068e5c6 lib/PAR.pm
 SHA1 3670831693b92311c425039cbacffe829fbb887e lib/PAR/FAQ.pod
 SHA1 b236006a3343ad736a4d5352dc1e017627c6f8b8 lib/PAR/Filter.pm
 SHA1 caeff2887611bb028f49ecc16f91be3e2005f952 lib/PAR/Filter/Bleach.pm
 SHA1 22fe366553e51dd33226a70f15b939213b9b91a9 lib/PAR/Filter/Bytecode.pm
 SHA1 3d05249a79d9534ea8565b984ea9dd23a86f7d2e lib/PAR/Filter/Obfuscate.pm
-SHA1 15e503285d3836ab53d5df427657f342c4ccb998 lib/PAR/Filter/PatchContent.pm
+SHA1 c350c392dbe3ed8f311eb5159bef2f991013a8d3 lib/PAR/Filter/PatchContent.pm
 SHA1 8a40b2673f73887cd05f2c66e08f01919f81db38 lib/PAR/Filter/PodStrip.pm
-SHA1 0cf9cddfc9e38824a4540dfc423affc4f375556f lib/PAR/Heavy.pm
-SHA1 56f8293c30169bb853e290fa89d103f82ca0d014 lib/PAR/Packer.pm
+SHA1 1ca28809a4d6863f8999ebb7527d48da8255b41e lib/PAR/Heavy.pm
+SHA1 16f0de2db5758a696268ea8b633877746f6cb990 lib/PAR/Packer.pm
 SHA1 44d0f288e8c9a7362697b5d64c4272da16cfe0c9 lib/PAR/Tutorial.pod
 SHA1 5db6a8ce4db737a5873290321f5324994e53fd45 myldr/Makefile.PL
 SHA1 4cb31931bfa898bba56d645b574983930492ab18 myldr/env.c
@@ -80,19 +80,19 @@
 SHA1 32d843a5700babb314f255c171c4852637d66b1f myldr/win32.obj
 SHA1 fa6066c09715081d4d3f36685852207ff70caf9e myldr/win32.res
 SHA1 c2186f98dd13bc70c29beeede8d4a0fc598791a3 package/parl.nsi
-SHA1 171c94bbc842537916180fd9c788d81a7304d21b script/par.pl
+SHA1 451fe1db1ccf618c4615a0a44aea1bdffedde0f1 script/par.pl
 SHA1 8ec91bc589fc78cf9d4d8f0ee6bc0a62eebfae3b script/parl.pod
-SHA1 6b3cafcebc012b21bfcaaf8679bbfe0b54dc82f5 script/pp
+SHA1 d0a5f84629075daadaf650491c0a1c5b7e333053 script/pp
 SHA1 8fa71d5726e8c6c0e484d6ccb20cc0bd83b669b6 script/tkpp
 SHA1 dc1c8eb9ff09172ea1df02257b68032695673e2e t/1-basic.t
-SHA1 41e4d691ae96f691d18c8b4e728b0346d37757f6 t/2-pp.t
-SHA1 eca1e42d9aaaa671b1dc93ffe2b7019134a8e022 t/30-current_exec.t
+SHA1 3b8ab1207b358709716fc05aa5da339f630d44b6 t/2-pp.t
+SHA1 d2f72a5665ecac6b5fce3bbacca86a2a65040e24 t/30-current_exec.t
 SHA1 a0258484d56cc699190be4cd93a16d145a0e1d16 t/hello.par
 SHA1 0146f0bd0bac69300c4317accbe2d9c69e18fef7 t/test-proc
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (GNU/Linux)
 
-iD8DBQFEbchHZCuimE51gxcRAk2VAJ0XGE88evNQc0NX0Vl2u/FCUi1jYQCgrqPC
-puoIJCe/6OsRIBo47XlHtak=
-=fxny
+iD8DBQFEgBFXZCuimE51gxcRAiyuAKCvSH0XHQMlx2o9tLibDcbDC0WmvwCeKTbI
+aY55/uPIdbzdIgvM87VLBEw=
+=Sttn
 -----END PGP SIGNATURE-----

Modified: packages/libpar-perl/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/debian/changelog?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/debian/changelog (original)
+++ packages/libpar-perl/trunk/debian/changelog Sun Jun  4 21:30:45 2006
@@ -1,3 +1,11 @@
+libpar-perl (0.94-1) unstable; urgency=low
+
+  * New upstream release
+  * debian/control:
+   - libmodule-scandeps-perl dependency updated to (>= 0.60)
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org>  Sun,  4 Jun 2006 23:28:22 +0200
+
 libpar-perl (0.93-1) unstable; urgency=low
 
   * New upstream release

Modified: packages/libpar-perl/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/debian/control?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/debian/control (original)
+++ packages/libpar-perl/trunk/debian/control Sun Jun  4 21:30:45 2006
@@ -1,7 +1,7 @@
 Source: libpar-perl
 Section: perl
 Priority: optional
-Build-Depends: perl (>= 5.8.0-7), libperl-dev, debhelper (>= 4.0.2), libmodule-install-perl, libmodule-scandeps-perl (>= 0.57), libarchive-zip-perl, libpar-dist-perl (>= 0.08), libdigest-sha1-perl, libmodule-signature-perl, gnupg
+Build-Depends: perl (>= 5.8.0-7), libperl-dev, debhelper (>= 4.0.2), libmodule-install-perl, libmodule-scandeps-perl (>= 0.60), libarchive-zip-perl, libpar-dist-perl (>= 0.08), libdigest-sha1-perl, libmodule-signature-perl, gnupg
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Florian Ragwitz <rafl at debian.org>, Krzysztof Krzyzaniak (eloy) <eloy at debian.org>
 Standards-Version: 3.7.2

Modified: packages/libpar-perl/trunk/lib/PAR.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/lib/PAR.pm?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/lib/PAR.pm (original)
+++ packages/libpar-perl/trunk/lib/PAR.pm Sun Jun  4 21:30:45 2006
@@ -1,5 +1,5 @@
 package PAR;
-$PAR::VERSION = '0.93';
+$PAR::VERSION = '0.94';
 
 use 5.006;
 use strict;
@@ -508,16 +508,24 @@
         $username =~ s/\W/_/g;
 
         my $stmpdir = File::Spec->catdir($path, "par-$username");
+        $stmpdir = $stmpdir =~ /^(.*)$/s;
         mkdir $stmpdir, 0755;
         if (!$ENV{PAR_CLEAN} and my $mtime = (stat($progname))[9]) {
             my $ctx = eval { require Digest::SHA; Digest::SHA->new(1) }
                    || eval { require Digest::SHA1; Digest::SHA1->new }
                    || eval { require Digest::MD5; Digest::MD5->new };
 
-            if ($ctx and open(my $fh, "<$progname")) {
-                binmode($fh);
-                $ctx->addfile($fh);
-                close($fh);
+            # Workaround for bug in Digest::SHA 5.38 and 5.39
+            my $sha_version = eval { $Digest::SHA::VERSION } || 0;
+            if ($sha_version eq '5.38' or $sha_version eq '5.39') {
+                $ctx->addfile($progname, "b") if ($ctx);
+            }
+            else {
+                if ($ctx and open(my $fh, "<$progname")) {
+                    binmode($fh);
+                    $ctx->addfile($fh);
+                    close($fh);
+                }
             }
 
             $stmpdir = File::Spec->catdir(

Modified: packages/libpar-perl/trunk/lib/PAR/Filter/PatchContent.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/lib/PAR/Filter/PatchContent.pm?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/lib/PAR/Filter/PatchContent.pm (original)
+++ packages/libpar-perl/trunk/lib/PAR/Filter/PatchContent.pm Sun Jun  4 21:30:45 2006
@@ -21,9 +21,27 @@
 
 sub PATCH_CONTENT () { +{
     map { ref($_) ? $_ : lc($_) }
-    'Pod/Usage.pm'	=> [
-    	' = $0' =>
-	' = $ENV{PAR_0} || $0',
+    'Pod/Usage.pm' => [
+        ' = $0' =>
+        ' = $ENV{PAR_0} || $0',
+    ],
+    # Some versions of Spreadsheet::ParseExcel have a weird non-POD construct =cmmt
+    # that is used to comment out a block of code. perl treats it as POD ans strips it.
+    # Since it's not POD, POD parsers ignore it.
+    # PAR::Filter::PodStrip only strips valid POD. Hence we remove it here.
+    'Spreadsheet/ParseExcel.pm' => [
+        qr/^=cmmt\s+.*=cut\s*/sm =>
+        '',
+    ],
+    'SQL/Parser.pm'      => [
+        'my @dialects;' =>
+        'require PAR;
+         my @dialects = ();
+         foreach my $member ( $PAR::LastAccessedPAR->members ) {
+             next unless $member->fileName =~ m!\bSQL/Dialects/([^/]+)\.pm$!;
+             push @dialects, $1;
+         }
+        ',
     ],
     'Tk.pm'             => [
         'foreach $dir (@INC)' => 
@@ -54,19 +72,9 @@
              $dll =~ s!\\\\!/!g;
          } else { die $! }',
     ],
-    'SQL/Parser.pm'   	    => [
-        'my @dialects;' =>
-        'require PAR;
-         my @dialects = ();
-         foreach my $member ( $PAR::LastAccessedPAR->members ) {
-             next unless $member->fileName =~ m!\bSQL/Dialects/([^/]+)\.pm$!;
-             push @dialects, $1;
-         }
-        ',
-    ],
-    'XSLoader.pm'	    => [
-    	'goto retry unless $module and defined &dl_load_file;' =>
-	'goto retry;',
+    'XSLoader.pm'     => [
+        'goto retry unless $module and defined &dl_load_file;' =>
+        'goto retry;',
     ],
     'diagnostics.pm'        => [
         'CONFIG: ' => 'CONFIG: if (0) ',
@@ -81,9 +89,9 @@
     ],
     'utf8_heavy.pl'	    => [
         '$list ||= eval { $caller->$type(); }'
-       	    => '$list = eval { $caller->$type(); }',
-	'|| croak("Can\'t find $encoding character property definition via $caller->$type or $file.pl")'
-	    => '|| croak("Can\'t find $encoding character property definition via $caller->$type or $file.pl") unless $list;'
+        => '$list = eval { $caller->$type(); }',
+    '|| croak("Can\'t find $encoding character property definition via $caller->$type or $file.pl")'
+        => '|| croak("Can\'t find $encoding character property definition via $caller->$type or $file.pl") unless $list;'
     ],
 } };
 
@@ -93,7 +101,12 @@
 
     my @rule = @{PATCH_CONTENT->{lc($name)}||[]} or return $$ref;
     while (my ($from, $to) = splice(@rule, 0, 2)) {
-        $$ref =~ s/\Q$from\E/$to/g;
+        if (ref($from) eq 'Regexp') {
+            $$ref =~ s/$from/$to/g;
+        }
+        else {
+            $$ref =~ s/\Q$from\E/$to/g;
+        }
     }
     return $$ref;
 }

Modified: packages/libpar-perl/trunk/lib/PAR/Heavy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/lib/PAR/Heavy.pm?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/lib/PAR/Heavy.pm (original)
+++ packages/libpar-perl/trunk/lib/PAR/Heavy.pm Sun Jun  4 21:30:45 2006
@@ -1,5 +1,5 @@
 package PAR::Heavy;
-$PAR::Heavy::VERSION = '0.08';
+$PAR::Heavy::VERSION = '0.09';
 
 =head1 NAME
 
@@ -127,12 +127,14 @@
             SUFFIX      => ".$dlext",
             UNLINK      => ($^O ne 'MSWin32'),
         );
+		($filename) = $filename =~ /^([\x20-\xff]+)$/;
     }
     else {
         $filename = File::Spec->catfile(
             ($ENV{PAR_TEMP} || File::Spec->tmpdir),
             ($name || ($member->crc32String . ".$dlext"))
         );
+		($filename) = $filename =~ /^([\x20-\xff]+)$/;
 
         open $fh, '>', $filename or die $!
             unless -r $filename and -e $filename

Modified: packages/libpar-perl/trunk/lib/PAR/Packer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/lib/PAR/Packer.pm?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/lib/PAR/Packer.pm (original)
+++ packages/libpar-perl/trunk/lib/PAR/Packer.pm Sun Jun  4 21:30:45 2006
@@ -197,9 +197,28 @@
 
         if (my $file_checker = $self->_can_run("file")) {
             $self->_vprint(0, "Checking file type... ");
-            system($file_checker, $file);
-        }
-        $self->_die("Please try a perlier file!\n");
+            my $checked = `$file_checker $file`;
+            if (defined $checked) {
+                $self->_vprint(
+                    0, "File type checking utility says this "
+                      ."about your file:\n$checked\n"
+                );
+                if ($checked =~ /text/) {
+                    $self->_vprint(
+                        0, "File is a text file, so we'll accept it."
+                    );
+                }
+                else {
+                    $self->_die("Please try a perlier file!\n");
+                }
+            }
+            else {
+                $self->_die("Please try a perlier file!\n");
+            }
+        }
+        else {
+            $self->_die("Please try a perlier file!\n");
+        }
     }
 
     my $handle = $self->_open($file);

Modified: packages/libpar-perl/trunk/script/par.pl
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/script/par.pl?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/script/par.pl (original)
+++ packages/libpar-perl/trunk/script/par.pl Sun Jun  4 21:30:45 2006
@@ -1,4 +1,7 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
+
+eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
+    if 0; # not running under some shell
 
 package __par_pl;
 
@@ -427,6 +430,8 @@
         die "$par is not a PAR file" unless <PAR> eq "PK\003\004";
     }
 
+    CreatePath($out) ;
+    
     my $fh = IO::File->new(
         $out,
         IO::File::O_CREAT() | IO::File::O_WRONLY() | IO::File::O_TRUNC(),
@@ -550,10 +555,17 @@
             || eval { require Digest::SHA1; Digest::SHA1->new }
             || eval { require Digest::MD5; Digest::MD5->new };
 
-        if ($ctx and open(my $fh, "<", $out)) {
-            binmode($fh);
-            $ctx->addfile($fh);
-            close($fh);
+        # Workaround for bug in Digest::SHA 5.38 and 5.39
+        my $sha_version = eval { $Digest::SHA::VERSION } || 0;
+        if ($sha_version eq '5.38' or $sha_version eq '5.39') {
+            $ctx->addfile($progname, "b") if ($ctx);
+        }
+        else {
+            if ($ctx and open(my $fh, "<$progname")) {
+                binmode($fh);
+                $ctx->addfile($fh);
+                close($fh);
+            }
         }
 
         $cache_name = $ctx ? $ctx->hexdigest : $mtime;
@@ -627,6 +639,17 @@
     $ENV{PAR_PROGNAME} = $progname = $0 = shift(@ARGV);
 }
 # }}}
+
+sub CreatePath {
+    my ($name) = @_;
+    
+    require File::Basename;
+    my ($basename, $path, $ext) = File::Basename::fileparse($name, ('\..*'));
+    
+    require File::Path;
+    
+	File::Path::mkpath($path) unless(-e $path); # mkpath dies with error
+}
 
 sub require_modules {
     #local $INC{'Cwd.pm'} = __FILE__ if $^O ne 'MSWin32';
@@ -691,10 +714,17 @@
                     || eval { require Digest::SHA1; Digest::SHA1->new }
                     || eval { require Digest::MD5; Digest::MD5->new };
 
-                if ($ctx and open(my $fh, "<", $progname)) {
-                    binmode($fh);
-                    $ctx->addfile($fh);
-                    close($fh);
+                # Workaround for bug in Digest::SHA 5.38 and 5.39
+                my $sha_version = eval { $Digest::SHA::VERSION } || 0;
+                if ($sha_version eq '5.38' or $sha_version eq '5.39') {
+                    $ctx->addfile($progname, "b") if ($ctx);
+                }
+                else {
+                    if ($ctx and open(my $fh, "<$progname")) {
+                        binmode($fh);
+                        $ctx->addfile($fh);
+                        close($fh);
+                    }
                 }
 
                 $stmpdir .= "$Config{_delim}cache-" . ( $ctx ? $ctx->hexdigest : $mtime );

Modified: packages/libpar-perl/trunk/script/pp
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/script/pp?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/script/pp (original)
+++ packages/libpar-perl/trunk/script/pp Sun Jun  4 21:30:45 2006
@@ -5,6 +5,7 @@
 use PAR::Packer ();
 use Module::ScanDeps ();
 use App::Packer::PAR ();
+use Getopt::ArgvFile default=>1;
 use Getopt::Long qw(:config no_ignore_case);
 
 *VERSION = *PAR::Packer::VERSION;
@@ -118,6 +119,9 @@
 
     # Pack 'hello' into a console-less 'out.exe' with icon (Win32 only)
     % pp --gui --icon hello.ico -o out.exe hello
+    
+    % pp @file hello.pl         # Pack 'hello.pl' but read _additional_
+                                # options from file 'file'
 
 =head1 DESCRIPTION
 
@@ -150,6 +154,14 @@
     % pp --output output.exe input.pl
     % pp --output=output.exe input.pl
 
+Since the command lines can become sufficiently long to reach the limits
+imposed by some shells, it is possible to have I<pp> read some of its
+options from one or more text files. The basic usage is to just include
+an argument starting with an 'at' (@) sigil. This argument will be
+interpeted as a file to read options from. Mixing ordinary options
+and C<@file> options is possible. This is implemented using the
+L<Getopt::ArgvFile> module, so read its documentation for advanced usage.
+
 =over 4
 
 =item B<-a>, B<--addfile>=I<FILE>|I<DIR>
@@ -405,6 +417,8 @@
 
 L<PAR>, L<PAR::Packer>, L<Module::ScanDeps>
 
+L<Getopt::Long>, L<Getopt::ArgvFile>
+
 =head1 ACKNOWLEDGMENTS
 
 Simon Cozens, Tom Christiansen and Edward Peschko for writing

Modified: packages/libpar-perl/trunk/t/2-pp.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/t/2-pp.t?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/t/2-pp.t (original)
+++ packages/libpar-perl/trunk/t/2-pp.t Sun Jun  4 21:30:45 2006
@@ -12,15 +12,15 @@
     $f1 eq $f2 and return 1;
     -e $f1 && -e $f2 or return 0;
     -s $f1 == -s $f2 or return 0;
-    local $/ = \32768;
-    open my $fh1, $f1
-	and open my $fh2, $f2
-	or return 0;
+    local $/ = \65536;
+    open my $fh1, '<', $f1 or return 0;
+	open my $fh2, '<', $f2 or return 0;
     while (1) {
-	my $c1 = <$fh1>;
-	my $c2 = <$fh2>;
-	last if !defined $c1 or !defined $c2;
-	return 0 if $c1 ne $c2;
+		my $c1 = <$fh1>;
+		my $c2 = <$fh2>;
+		last if !defined $c1 and !defined $c2;
+		return 0 if !defined $c1 or !defined $c2;
+		return 0 if $c1 ne $c2;
     }
     return 1;
 }

Modified: packages/libpar-perl/trunk/t/30-current_exec.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libpar-perl/trunk/t/30-current_exec.t?rev=2866&op=diff
==============================================================================
--- packages/libpar-perl/trunk/t/30-current_exec.t (original)
+++ packages/libpar-perl/trunk/t/30-current_exec.t Sun Jun  4 21:30:45 2006
@@ -47,8 +47,7 @@
 
 my( $file, $path ) = fileparse( $EXEC );
 
-$ENV{PATH} = $path;
-my $out_path = qx($file);
+my $out_path = do { local $ENV{PATH} = $path; qx($file); };
 
 is( $out_path, $out_full, "Found the same file via PATH and full path" );
 
@@ -83,6 +82,7 @@
     unless( $pid ) {        # child
         $ENV{PAR_GLOBAL_TMPDIR} = $TEMP;
         # warn "EXEC=$EXEC file=$file" ;
+		$ENV{PATH} = $path;
         exec_prog( $EXEC, $file );
     }
     my $exec_full = join '', <PROG>;




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