r2148 - in packages/libpar-perl/branches/upstream/current: .
contrib/automated_pp_test contrib/procedural_pp inc
inc/Module inc/Module/Install inc/Module/Install/PRIVATE
inc/Test inc/Test/Builder lib lib/App/Packer lib/PAR
lib/PAR/Filter myldr script t
Krzysztof Krzyzaniak
eloy at costa.debian.org
Fri Feb 17 08:50:17 UTC 2006
Author: eloy
Date: 2006-02-17 08:49:34 +0000 (Fri, 17 Feb 2006)
New Revision: 2148
Added:
packages/libpar-perl/branches/upstream/current/inc/Module/AutoInstall.pm
packages/libpar-perl/branches/upstream/current/inc/Test/Builder/
packages/libpar-perl/branches/upstream/current/inc/Test/Builder/Module.pm
Removed:
packages/libpar-perl/branches/upstream/current/inc/ExtUtils/
packages/libpar-perl/branches/upstream/current/inc/Module/Install/PRIVATE.pm
Modified:
packages/libpar-perl/branches/upstream/current/AUTHORS
packages/libpar-perl/branches/upstream/current/ChangeLog
packages/libpar-perl/branches/upstream/current/MANIFEST
packages/libpar-perl/branches/upstream/current/META.yml
packages/libpar-perl/branches/upstream/current/Makefile.PL
packages/libpar-perl/branches/upstream/current/README
packages/libpar-perl/branches/upstream/current/SIGNATURE
packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/automated_pp_test.pl
packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/pipe_a_command.pm
packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/prior_to_test.pm
packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/remove_file_and_try_executable_again.pm
packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/test_in_further_subdir.pm
packages/libpar-perl/branches/upstream/current/contrib/procedural_pp/pp_old
packages/libpar-perl/branches/upstream/current/inc/Module/Install.pm
packages/libpar-perl/branches/upstream/current/inc/Module/Install/AutoInstall.pm
packages/libpar-perl/branches/upstream/current/inc/Module/Install/Base.pm
packages/libpar-perl/branches/upstream/current/inc/Module/Install/Can.pm
packages/libpar-perl/branches/upstream/current/inc/Module/Install/Makefile.pm
packages/libpar-perl/branches/upstream/current/inc/Module/Install/Metadata.pm
packages/libpar-perl/branches/upstream/current/inc/Module/Install/PRIVATE/PAR.pm
packages/libpar-perl/branches/upstream/current/inc/Module/Install/WriteAll.pm
packages/libpar-perl/branches/upstream/current/inc/Test/Builder.pm
packages/libpar-perl/branches/upstream/current/inc/Test/More.pm
packages/libpar-perl/branches/upstream/current/lib/App/Packer/PAR.pm
packages/libpar-perl/branches/upstream/current/lib/PAR.pm
packages/libpar-perl/branches/upstream/current/lib/PAR/FAQ.pod
packages/libpar-perl/branches/upstream/current/lib/PAR/Filter.pm
packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/Bleach.pm
packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/Bytecode.pm
packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/Obfuscate.pm
packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/PatchContent.pm
packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/PodStrip.pm
packages/libpar-perl/branches/upstream/current/lib/PAR/Heavy.pm
packages/libpar-perl/branches/upstream/current/lib/PAR/Packer.pm
packages/libpar-perl/branches/upstream/current/lib/PAR/Tutorial.pod
packages/libpar-perl/branches/upstream/current/myldr/Makefile.PL
packages/libpar-perl/branches/upstream/current/myldr/file2c.pl
packages/libpar-perl/branches/upstream/current/myldr/static.c
packages/libpar-perl/branches/upstream/current/script/par.pl
packages/libpar-perl/branches/upstream/current/script/parl.pod
packages/libpar-perl/branches/upstream/current/script/pp
packages/libpar-perl/branches/upstream/current/script/tkpp
packages/libpar-perl/branches/upstream/current/t/2-pp.t
Log:
Load /tmp/tmp.ldn3xM/libpar-perl-0.91 into
packages/libpar-perl/branches/upstream/current.
Modified: packages/libpar-perl/branches/upstream/current/AUTHORS
===================================================================
--- packages/libpar-perl/branches/upstream/current/AUTHORS 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/AUTHORS 2006-02-17 08:49:34 UTC (rev 2148)
@@ -108,6 +108,7 @@
Simon Andrews
Simon Cozens (SIMON)
Sisyphus
+Steffen Mueller (SMUELLER)
Steve Hay (SHAY)
Stephen Pick
TP Diffenbach
Modified: packages/libpar-perl/branches/upstream/current/ChangeLog
===================================================================
--- packages/libpar-perl/branches/upstream/current/ChangeLog 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/ChangeLog 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,3 +1,20 @@
+[Changes for 0.91 - February 13, 2006]
+
+* Bug Fixes
+
+ - Applied Alan Stewart's patch which fixes @ARGV pollution in
+ daughter programs. See also
+ http://www.nntp.perl.org/group/perl.par/2152
+ - Now mentioning the ENV var "PAR_VERBATIM" in the documentation.
+ See also http://www.nntp.perl.org/group/perl.par/2196
+ - Applied Malcolm Nooning's fix for the test suite. We used to get
+ failed tests on Windows because of spaces in path names.
+ - Applied Roderich Schupp's and Malcolm Nooning's patches to
+ the test suite fixing problems with Cygwin.
+ - Applied Vincent Ladeuil's patch to PAR::Filter::Bleach to return a
+ true value for modules that loaded okay.
+ - Changed 'PAR_BASE' in the Makefile.PL to 'SMUELLER'.
+
[Changes for 0.90 - November 25, 2005]
* Bug Fixes
Modified: packages/libpar-perl/branches/upstream/current/MANIFEST
===================================================================
--- packages/libpar-perl/branches/upstream/current/MANIFEST 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/MANIFEST 2006-02-17 08:49:34 UTC (rev 2148)
@@ -16,7 +16,7 @@
contrib/procedural_pp/pp_old
contrib/stdio/Stdio.pm
contrib/stdio/Stdio_readme.txt
-inc/ExtUtils/AutoInstall.pm
+inc/Module/AutoInstall.pm
inc/Module/Install.pm
inc/Module/Install/AutoInstall.pm
inc/Module/Install/Base.pm
@@ -26,11 +26,11 @@
inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
inc/Module/Install/PAR.pm
-inc/Module/Install/PRIVATE.pm
inc/Module/Install/PRIVATE/PAR.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
inc/Test/Builder.pm
+inc/Test/Builder/Module.pm
inc/Test/More.pm
lib/App/Packer/PAR.pm
lib/PAR.pm
@@ -68,7 +68,7 @@
script/parl.pod
script/pp
script/tkpp
-SIGNATURE Public-key signature (added by MakeMaker)
+SIGNATURE
t/1-basic.t
t/2-pp.t
t/hello.par
Modified: packages/libpar-perl/branches/upstream/current/META.yml
===================================================================
--- packages/libpar-perl/branches/upstream/current/META.yml 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/META.yml 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,21 +1,48 @@
-name: PAR
-version: 0.90
+
abstract: Perl Archive Tookit
-author: Autrijus Tang (autrijus at autrijus.org)
+author: Audrey Tang <autrijus at autrijus.org>
+distribution_type: module
+generated_by: Module::Install version 0.56
license: perl
-distribution_type: module
-requires:
- perl: 5.6.0
+name: PAR
+no_index:
+ directory:
+ - contrib
+ - inc
+ - t
+provides:
+ App::Packer::PAR:
+ file: lib/App/Packer/PAR.pm
+ version: 0.91
+ PAR:
+ file: lib/PAR.pm
+ version: 0.91
+ PAR::Filter:
+ file: lib/PAR/Filter.pm
+ version: 0.02
+ PAR::Filter::Bleach:
+ file: lib/PAR/Filter/Bleach.pm
+ PAR::Filter::Bytecode:
+ file: lib/PAR/Filter/Bytecode.pm
+ PAR::Filter::Obfuscate:
+ file: lib/PAR/Filter/Obfuscate.pm
+ PAR::Filter::PatchContent:
+ file: lib/PAR/Filter/PatchContent.pm
+ PAR::Filter::PodStrip:
+ file: lib/PAR/Filter/PodStrip.pm
+ PAR::Heavy:
+ file: lib/PAR/Heavy.pm
+ version: 0.08
+ PAR::Packer:
+ file: lib/PAR/Packer.pm
+ version: 0.12
+recommends:
+ Digest: Module::Signature
+requires:
+ Archive::Zip: 1
+ Compress::Zlib: 1.3
File::Temp: 0.05
- Compress::Zlib: 1.3
- Archive::Zip: 1
Module::ScanDeps: 0.45
PAR::Dist: 0.06
-recommends:
- Digest: 0
- Module::Signature: 0.35
-no_index:
- directory:
- - contrib
- - inc
-generated_by: Module::Install version 0.39
+ perl: 5.6.0
+version: 0.91
Modified: packages/libpar-perl/branches/upstream/current/Makefile.PL
===================================================================
--- packages/libpar-perl/branches/upstream/current/Makefile.PL 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/Makefile.PL 2006-02-17 08:49:34 UTC (rev 2148)
@@ -3,46 +3,45 @@
use 5.006;
use inc::Module::Install;
-name ('PAR');
-abstract ('Perl Archive Tookit');
-version_from('lib/PAR.pm');
-license ('perl');
+name 'PAR';
+abstract 'Perl Archive Tookit';
+all_from 'lib/PAR.pm';
-requires ('perl' => 5.006);
-requires ('File::Temp' => 0.05);
-requires ('Compress::Zlib' => ($^O eq 'MSWin32') ? 1.16 : 1.30);
-requires ('Archive::Zip' => 1.00);
-requires ('Module::ScanDeps' => 0.45);
-requires ('PAR::Dist' => 0.06);
-features (
- 'Windows --icon and --info support' => [
- -default => 0,
- recommends ('Parse::Binary' => 0.04),
- recommends ('Win32::Exe' => 0.04),
- ],
-) if ($^O eq 'MSWin32');
+requires 'File::Temp' => 0.05;
+requires 'Compress::Zlib' => ($^O eq 'MSWin32') ? 1.16 : 1.30;
+requires 'Archive::Zip' => 1.00;
+requires 'Module::ScanDeps' => 0.45;
+requires 'PAR::Dist' => 0.06;
-features (
- 'Digital signature support' => [
- -default => 0,
- recommends ('Digest' => 0),
- (
- (eval { require Digest::SHA1; 1 } or
- eval { require Digest::SHA; 1 } or
- eval { require Digest::SHA::PurePerl; 1 }) ? () :
- recommends( (can_cc() ? 'Digest::SHA' : 'Digest::SHA::PurePerl') => 0 )
- ),
- recommends ('Module::Signature' => 0.35),
- ],
-) if (eval { require Crypt::OpenPGP; 1 } or can_run('gpg'));
+if ($^O eq 'MSWin32') {
+ feature 'Windows --icon and --info support',
+ recommends
+ 'Parse::Binary' => 0.04,
+ 'Win32::Exe' => 0.04;
+}
-include('ExtUtils::AutoInstall');
-include_deps('Test::More');
+if (can_use('Crypt::OpenPGP') or can_run('gpg')) {
+ my $has_sha1 = (
+ can_use('Digest::SHA1') or
+ can_use('Digest::SHA') or
+ can_use('Digest::SHA::PurePerl')
+ );
-sign(1);
-auto_install_now( -default => 0 );
-no_index(directory => 'contrib');
+ feature 'Digital signature support',
+ recommends
+ 'Digest',
+ ($has_sha1 ? () : (can_cc() ? 'Digest::SHA'
+ : 'Digest::SHA::PurePerl')),
+ 'Module::Signature';
+}
-&Autrijus->write;
-&WriteAll;
-&Autrijus->fix;
+include_deps 'Test::More';
+no_index directory => 'contrib';
+auto_install_now -default => 0;
+auto_provides;
+
+par_base 'SMUELLER';
+
+par_prehook;
+WriteAll sign => 1;
+par_posthook;
Modified: packages/libpar-perl/branches/upstream/current/README
===================================================================
--- packages/libpar-perl/branches/upstream/current/README 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/README 2006-02-17 08:49:34 UTC (rev 2148)
@@ -42,7 +42,7 @@
However, if nobody has generated such a package for your architecture,
you will see a short messages like this:
- Fetching 'PAR-0.81-i386-freebsd-5.8.0.par' from www.cpan.org...
+ Fetching 'PAR-0.91-i386-freebsd-5.8.0.par' from www.cpan.org...
*** No installation package available for your architecture.
However, you may wish to generate one with 'make par' and send
it to <AUTRIJUS at cpan.org>, so other people on the same platform
@@ -144,7 +144,7 @@
* Copyright
-Copyright 2002, 2003, 2004, 2005 by Autrijus Tang <autrijus at autrijus.org>.
+Copyright 2002, 2003, 2004, 2005, 2006 by Audrey Tang <autrijus at autrijus.org>.
All rights reserved. You can redistribute and/or modify
this bundle under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/SIGNATURE
===================================================================
--- packages/libpar-perl/branches/upstream/current/SIGNATURE 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/SIGNATURE 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,12 +1,12 @@
This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.41.
+signed via the Module::Signature module, version 0.50.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
% cpansign -v
-It would check each file's integrity, as well as the signature's
+It will check each file's integrity, as well as the signature's
validity. If "==> Signature verified OK! <==" is not displayed,
the distribution may already have been compromised, and you should
not run its Makefile.PL or Build.PL.
@@ -14,84 +14,83 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 1bbd8d95d6633a8cc0f729c7283710b62d7bbf91 AUTHORS
-SHA1 bd7b45531ddea819c35b781d1941f9d2627d906d ChangeLog
-SHA1 168cf7566e4573eaedc6e0dc503a619886bf0573 MANIFEST
+SHA1 ca0d1987d33d411791e84da4fda08f4d28782e67 AUTHORS
+SHA1 26860440b8f524bc163dec15d27c0233ddb24ae1 ChangeLog
+SHA1 c4b7c4cc9f8bd8ebf18b1667fb5f0b6b6fa4e22b MANIFEST
SHA1 a425969945e62fcc7783784916d552d370b94951 MANIFEST.SKIP
-SHA1 edebde589988f5a79d480ff985cc4abc58dd12e9 META.yml
-SHA1 8954dbccfff96033c2b790b3a3d9a4bed829e8b0 Makefile.PL
-SHA1 b8c8fc2e7f81dd4331c02f8cbda68e19fbd5c4f4 README
+SHA1 293754d868d3d6e00f1ac17b7f0444d31fa1f936 META.yml
+SHA1 513adf01cd6f3a7a18d2b42017deb6947fe42b4b Makefile.PL
+SHA1 dbdaa94bca1479b760a92436b002ee8228834861 README
SHA1 aa8cd09fa1945de92b01d77b979b4c8769f148c2 TODO
-SHA1 4b474033fa138db434003eddb7536d82d2ce4b57 contrib/automated_pp_test/automated_pp_test.pl
+SHA1 5b59e5c9ef0fc0773ba431c3c171722cb677eda9 contrib/automated_pp_test/automated_pp_test.pl
SHA1 31c0a2375a9f05052499fce55574b0411786f372 contrib/automated_pp_test/hello_tk.pl
SHA1 3a32ffa47e874433d554b80633a3e125901d1bcf contrib/automated_pp_test/hi.ico
-SHA1 a1de215a67c9b3aea01a90a8cc470c3a534315d6 contrib/automated_pp_test/pipe_a_command.pm
-SHA1 2d3b9779713b656cd94de882911f389584e925c0 contrib/automated_pp_test/prior_to_test.pm
-SHA1 62d39b2306b17b845b876a7fe56c9997685fbffd contrib/automated_pp_test/remove_file_and_try_executable_again.pm
-SHA1 77a0eb02b1d8743ce16d1e762dd9125a4eaa113f contrib/automated_pp_test/test_in_further_subdir.pm
+SHA1 d5d0c6cc0d13ed428ce51d99387e366471f1ac70 contrib/automated_pp_test/pipe_a_command.pm
+SHA1 b71b276dc9bd9fef3dc534ead9c9aea001f83b12 contrib/automated_pp_test/prior_to_test.pm
+SHA1 b59d11c31c7f5d8f1ad5e8e67bb08008d8ec74a5 contrib/automated_pp_test/remove_file_and_try_executable_again.pm
+SHA1 6491158cf82d6682209955c1ad9a26c1759790b6 contrib/automated_pp_test/test_in_further_subdir.pm
SHA1 2b131d29057aeb0b63d4b98e80eeeebc62002a27 contrib/docs/where_is_it.txt
SHA1 de2340efaea767d9367c1f92c7e117c747dfd48c contrib/docs/who_am_i.txt
SHA1 5f6ae715822f2483c9ada55ab32dfcaf2798667a contrib/gui_pp/gpp
SHA1 13db62c6e2077cd551d2aaee85fab52795440e4a contrib/gui_pp/gpp_readme.txt
SHA1 0e486fcdfccc73b120b72aad213a0a3b87e4a347 contrib/pare/pare
SHA1 0d80cbbe5457a5a2db9c3cf7115c828d46ad1fe4 contrib/pare/pare_readme.txt
-SHA1 562619426ae68be93148d6c52dbdc5e16294f7f9 contrib/procedural_pp/pp_old
+SHA1 35cdb91b6b5de606e239e6c77f52a5a057dbbb7f contrib/procedural_pp/pp_old
SHA1 eff2e79f0964da302217673f16abea9424a2bbdd contrib/stdio/Stdio.pm
SHA1 e44e340a0a4b63c57a81173f3592c6f9c21c0d4d contrib/stdio/Stdio_readme.txt
-SHA1 6e3780de396adc1991ee4daafb5ae13bb93ae6a3 inc/ExtUtils/AutoInstall.pm
-SHA1 014bc8da033c1ff45d83d925ff658aa5fea343d8 inc/Module/Install.pm
-SHA1 485d8ff10f85ab63ab4d29b77eccd298043a692e inc/Module/Install/AutoInstall.pm
-SHA1 a7f7e2bfb0ac6f8ad965832ef3a246a7bd433058 inc/Module/Install/Base.pm
-SHA1 7b0e82ea99187c2121bfc8fe590de8363e8100d7 inc/Module/Install/Can.pm
-SHA1 d097dedadac0edcafbee3a14c262e24089f5795e inc/Module/Install/Fetch.pm
-SHA1 08bfc9e53d1e15f5556c9d282a7db70a68b9ff06 inc/Module/Install/Include.pm
-SHA1 4a702e765fcb130e262b9ba69a83c6c9da4e89e7 inc/Module/Install/Makefile.pm
-SHA1 2f9a6d1fe7413b0c41760664d3a2d7f23793911a inc/Module/Install/Metadata.pm
-SHA1 c658c36dd5ad01202224a867a3c88cb2a98821ed inc/Module/Install/PAR.pm
-SHA1 aa7491995a15f183d75d8d9428f7614c1c855b0f inc/Module/Install/PRIVATE.pm
-SHA1 f288814ac325546e91779b68f9821d427c8107b4 inc/Module/Install/PRIVATE/PAR.pm
-SHA1 8ee248d67d4c61a4f01e6a96c41afbd93be4c9ef inc/Module/Install/Win32.pm
-SHA1 3c099dd7fb73a49bcc489b152c3ca3c7a1b36427 inc/Module/Install/WriteAll.pm
-SHA1 9d135b52aef905c9b23bb1ead96ca8a48dd6cb82 inc/Test/Builder.pm
-SHA1 0b38d0a7e1db5f84cd3c8b9716cd8c5fc1b35ef2 inc/Test/More.pm
-SHA1 36ab1e3f0cc53b0902d9dac5f37f009eea2d20ef lib/App/Packer/PAR.pm
-SHA1 00032eb2b043d20acf656b536dcb7a7f133f8478 lib/PAR.pm
-SHA1 882fbe5fa73105cb7dff7112f561ef1e203970d4 lib/PAR/FAQ.pod
-SHA1 4116b3d780bac95786fb5f3f399776394af6a7f6 lib/PAR/Filter.pm
-SHA1 7555dad2a51468f5ebb6e1568a176c93b3cf596c lib/PAR/Filter/Bleach.pm
-SHA1 8f28af8d74ee814aa1e53e75db1025a0cd23c9d9 lib/PAR/Filter/Bytecode.pm
-SHA1 3c64d6750fc5fa51f6becfe3b77fec60eccdf6cc lib/PAR/Filter/Obfuscate.pm
-SHA1 152b6b65489c06723ee214771a151b9623b61ae6 lib/PAR/Filter/PatchContent.pm
-SHA1 e195ad51ac8ece60e27664e1987e4ff8eb34c4fe lib/PAR/Filter/PodStrip.pm
-SHA1 1cb5f65672261273f2b1635b32dbbf6d5e869a6f lib/PAR/Heavy.pm
-SHA1 e5482b60122002730a085fb833e4be54faf93118 lib/PAR/Packer.pm
-SHA1 ba16ae003a67dae31d1eea7f670a68601a4373f4 lib/PAR/Tutorial.pod
-SHA1 2baa5c9a2c7d88c5969d97f68e02afac045c6f53 myldr/Makefile.PL
+SHA1 7c4c900481d5d3d8c979999d11be84f8ade56cdb inc/Module/AutoInstall.pm
+SHA1 88be41f6df2e4ae2f7c52cc6fcda0646b8923df1 inc/Module/Install.pm
+SHA1 b43b16d0562926a60ebe71e72d6d23da94c1d011 inc/Module/Install/AutoInstall.pm
+SHA1 08705de1d92096e40b815fbe103f5ef820d98202 inc/Module/Install/Base.pm
+SHA1 852bba01c964cf2501d15577ffc0678501d10760 inc/Module/Install/Can.pm
+SHA1 57d3ef2e95eb21b4426e54fcefd6ea3d34d16b35 inc/Module/Install/Fetch.pm
+SHA1 144e5bfc69327edd6a3cdddd12ea9baf8258c9ca inc/Module/Install/Include.pm
+SHA1 31707ee5cb077d316361604e30d4eeb527a49e26 inc/Module/Install/Makefile.pm
+SHA1 9baeb2f4f4c92f67f1e0d7be4e370af5019d9bb5 inc/Module/Install/Metadata.pm
+SHA1 b5db06e6242c35a5cd04c3868855a24326e2ca28 inc/Module/Install/PAR.pm
+SHA1 07940a52a61b1456023751be6bffa012fe1186ab inc/Module/Install/Win32.pm
+SHA1 9aeb39d66698a45e1f997e1536bda96183a4ba3d inc/Module/Install/WriteAll.pm
+SHA1 765717a59f1392106e08d3db1a16fb8ccb0a581b inc/Test/Builder.pm
+SHA1 b11f1d529c0e00f6c371372bbe32436448c17213 inc/Test/Builder/Module.pm
+SHA1 f6dac45b1c075831ee11bc9556f1363cf7557b7f inc/Test/More.pm
+SHA1 f2e051c0866a1e186ef57fe4360651fac64d858d lib/App/Packer/PAR.pm
+SHA1 4af87e745060073dcee067c3583e059df2374815 lib/PAR.pm
+SHA1 273a2088dc4e30b8a0b98a9de579e9298e130e17 lib/PAR/FAQ.pod
+SHA1 22b4c1b619c620ecd89d93629e3daed86625d8cf lib/PAR/Filter.pm
+SHA1 63768c965b809100bc1120a440f8c32907e897c6 lib/PAR/Filter/Bleach.pm
+SHA1 223ec39aaafe3a40e8f8cdf8c139019620a23b2c lib/PAR/Filter/Bytecode.pm
+SHA1 437aaa61b655264ef7dd6c39e87c7294db4e52b2 lib/PAR/Filter/Obfuscate.pm
+SHA1 721be2a17508ca2f1f0d0036ac430530876acfd4 lib/PAR/Filter/PatchContent.pm
+SHA1 31a78a2796a8359696dd2ded28f21b96d148249d lib/PAR/Filter/PodStrip.pm
+SHA1 dda714381a3f826af8a5ad73025cce471e19f95c lib/PAR/Heavy.pm
+SHA1 b5ca31e35eb146d2b45a54b313bbc30f0abd5fc0 lib/PAR/Packer.pm
+SHA1 0fdcb51d4a0dbae40cd19733e7b0dafbf79fea86 lib/PAR/Tutorial.pod
+SHA1 1325371209aa6e97deaea038db1988892056e76b myldr/Makefile.PL
SHA1 4cb31931bfa898bba56d645b574983930492ab18 myldr/env.c
-SHA1 756242c3edcacb7d17cd9779b24f5249bd6d9d3a myldr/file2c.pl
+SHA1 7b9e3754a78faf016df63e2115675c2ba573e836 myldr/file2c.pl
SHA1 333851193e3d00e2ca89623505a98829f2e8e2fc myldr/internals.c
SHA1 867e346fca981617b48b505bf494f999950fff0c myldr/main.c
SHA1 ec05dc3763fa1b34fa1e6fb683f596962d36d816 myldr/mktmpdir.c
SHA1 2eb81ebccc155c56bf9ea5f6c068d42b1071d0f2 myldr/mktmpdir.h
SHA1 72afd945a0dc5ed00ab5af9ab962727fcf555525 myldr/parlsig.pl
SHA1 89862cdbf80d79e6525966589bc6cd3df93fb785 myldr/sha1.c.PL
-SHA1 0fb985b730168a862c4ae2f415d5775694134793 myldr/static.c
+SHA1 37abcc079e73b6ab495e83a31230791da2c6d67e myldr/static.c
SHA1 a04f43509c4638af15d67b441f268c0763917b11 myldr/utils.c
SHA1 7b3e5be07f3db44c7f1a37ece3feea173e39fa9d myldr/win32.coff
SHA1 32d843a5700babb314f255c171c4852637d66b1f myldr/win32.obj
SHA1 fa6066c09715081d4d3f36685852207ff70caf9e myldr/win32.res
SHA1 c2186f98dd13bc70c29beeede8d4a0fc598791a3 package/parl.nsi
-SHA1 2e0303b3ec1a3e69c75d62664bb6d24860fa8a3a script/par.pl
-SHA1 11f862dcecc4517dbc1818689ea08af633f744a0 script/parl.pod
-SHA1 05822cccfc3c014e041f041b67351f5a6a0cd162 script/pp
-SHA1 c84573da4ce6038635644f1eca205b85c9a32cf9 script/tkpp
+SHA1 354ed010b2b41d713160140f39e2e52a7cb49165 script/par.pl
+SHA1 6977f8a917034b148585efe3aa94abb55863097f script/parl.pod
+SHA1 8c72e81173eb546cc1fe983dc5897a0bd020484c script/pp
+SHA1 fdf4745fe74a7b076af0e87046ad76443e82628a script/tkpp
SHA1 dc1c8eb9ff09172ea1df02257b68032695673e2e t/1-basic.t
-SHA1 ca42829ecd023b952704469ac0adcb78ad164401 t/2-pp.t
+SHA1 41e4d691ae96f691d18c8b4e728b0346d37757f6 t/2-pp.t
SHA1 a0258484d56cc699190be4cd93a16d145a0e1d16 t/hello.par
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2 (FreeBSD)
+Version: GnuPG v1.4.0 (GNU/Linux)
-iD8DBQFDh5cotLPdNzw1AaARAjreAKCzmQX2s7ee8WOf2KlWl8TsBzvsxACeLzt8
-iP/wf9PZX3zE76F9XiOPkjc=
-=HJhc
+iD8DBQFD8JCeZCuimE51gxcRApefAJ9m78BHwLCGS/RVmAUrCHN8cXnnJwCfcDMA
+WsPeC7E9E6PYKcZMa/55RiY=
+=RFzu
-----END PGP SIGNATURE-----
Modified: packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/automated_pp_test.pl
===================================================================
--- packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/automated_pp_test.pl 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/automated_pp_test.pl 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
########################################################################
-# Copyright 2004 by Malcolm Nooning
+# Copyright 2004-2006 by Malcolm Nooning
# This program does not impose any
# licensing restrictions on files generated by their execution, in
# accordance with the 8th article of the Artistic License:
@@ -23,7 +23,7 @@
#
#
########################################################################
-our $VERSION = 0.12;
+our $VERSION = 0.15;
########################################################################
# Prior to each test
# . Remove any possible files that could exist from a previous
@@ -643,7 +643,7 @@
my $error = EXIT_FAILURE;
my $test_file = $hello_pl_file;
- my $pipe_command_string = "$perl $par ";
+ my $pipe_command_string = "$perl \"$par\" ";
my $cmd = "";
my $sub_test = 0;
my $print_cannot_locate_message = $FALSE;
@@ -724,7 +724,7 @@
my $error = EXIT_FAILURE;
my $test_file = $hello_pl_file;
- my $pipe_command_string = "$perl $par ";
+ my $pipe_command_string = "$perl \"$par\" ";
my $cmd = "";
my $sub_test = 0;
my $print_cannot_locate_message = $FALSE;
@@ -770,7 +770,7 @@
}
#.................................................................
- $pipe_command_string = "$perl $par hello";
+ $pipe_command_string = "$perl \"$par\" hello";
$error = pipe_a_command
(
$test_number,
@@ -834,7 +834,7 @@
my $error = EXIT_FAILURE;
my $test_file = $hello_pl_file;
- my $pipe_command_string = "$perl $par ";
+ my $pipe_command_string = "$perl \"$par\" ";
my $cmd = "";
my $sub_test = 0;
my $print_cannot_locate_message = $FALSE;
@@ -983,7 +983,7 @@
#--------------------------------------------------------------------
my $error = EXIT_FAILURE;
- my $pipe_command_string = "$perl $par ";
+ my $pipe_command_string = "$perl \"$par\" ";
my $cmd = "";
my $sub_test = 0;
my $print_cannot_locate_message = $FALSE;
@@ -1035,7 +1035,7 @@
#.................................................................
- $pipe_command_string = "$perl $par hello";
+ $pipe_command_string = "$perl \"$par\" hello";
$error = pipe_a_command
(
$test_number,
@@ -1116,7 +1116,7 @@
#--------------------------------------------------------------------
my $error = EXIT_FAILURE;
- my $pipe_command_string = "$perl $par ";
+ my $pipe_command_string = "$perl \"$par\" ";
my $cmd = "";
my $sub_test = 0;
my $print_cannot_locate_message = $FALSE;
@@ -1169,7 +1169,7 @@
#.................................................................
- $pipe_command_string = "$perl $par out";
+ $pipe_command_string = "$perl \"$par\" out";
$error = pipe_a_command
(
$test_number,
@@ -1255,7 +1255,7 @@
my $error = EXIT_FAILURE;
- my $pipe_command_string = "$perl $par ";
+ my $pipe_command_string = "$perl \"$par\" ";
my $cmd = "";
my $sub_test = 0;
@@ -1321,7 +1321,7 @@
}
#.................................................................
- $pipe_command_string = "$perl $par out_par";
+ $pipe_command_string = "$perl \"$par\" out_par";
$error = pipe_a_command
(
$test_number,
@@ -1378,7 +1378,7 @@
#.................................................................
- $pipe_command_string = "$perl $par out_par_B";
+ $pipe_command_string = "$perl \"$par\" out_par_B";
$error = pipe_a_command
(
$test_number,
@@ -1669,7 +1669,7 @@
my $error = EXIT_FAILURE;
- my $pipe_command_string = "$perl $par ";
+ my $pipe_command_string = "$perl \"$par\" ";
my $cmd = "";
my $sub_test = 0;
my $print_cannot_locate_message = $FALSE;
@@ -1717,7 +1717,7 @@
#.................................................................
- $pipe_command_string = "$perl $par a";
+ $pipe_command_string = "$perl \"$par\" a";
$error = pipe_a_command
(
$test_number,
@@ -3778,7 +3778,7 @@
}
#..........................................................
- $pipe_command_string = "pp -r $hello_pl_file";
+ $pipe_command_string = "pp -r \"$hello_pl_file\"";
$cmd = $pipe_command_string; # Just to keep our code
# template here consistent.
#.................................................................
@@ -3871,7 +3871,7 @@
#..........................................................
$pipe_command_string =
- "pp -r $hello_pl_file \"one\" \"two\" \"three\"";
+ "pp -r \"$hello_pl_file\" \"one\" \"two\" \"three\"";
$cmd = $pipe_command_string; # Just to keep our code
# template here consistent.
#.................................................................
@@ -4396,7 +4396,7 @@
'pp -v 3 hello.pl -o hello.exe > v_3_h_o.txt',
);
- if ($os !~ m/^Win/i) {
+ if ($os !~ m/^Win|cygwin/i) {
@converted_array = ();
foreach $command_string (@command_strings) {
$command_string =~ s/hello.exe/hello.out/g;
@@ -4447,7 +4447,7 @@
#............. Remove the ".exe" parts if not Windows
- if ($os !~ m/^Win/i) {
+ if ($os !~ m/^Win|cygwin/i) {
@converted_array = ();
foreach $line (@results_to_expect_v) {
$line =~ s/parl.exe/\/parl\\b/g;
@@ -4457,7 +4457,7 @@
push(@results_to_expect_v, @converted_array);
}
- if ($os !~ m/^Win/i) {
+ if ($os !~ m/^Win|cygwin/i) {
@converted_array = ();
foreach $line (@results_to_expect_vv) {
$line =~ s/parl.exe/\/parl\\b/g;
@@ -4467,7 +4467,7 @@
push(@results_to_expect_vv, @converted_array);
}
- if ($os !~ m/^Win/i) {
+ if ($os !~ m/^Win|cygwin/i) {
@converted_array = ();
foreach $line (@results_to_expect_vvv) {
$line =~ s/parl.exe/\/parl\\b/g;
Modified: packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/pipe_a_command.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/pipe_a_command.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/pipe_a_command.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -25,7 +25,7 @@
########################################################################
#
########################################################################
-our $VERSION = 0.07;
+our $VERSION = '0.07';
########################################################################
# Usage:
Modified: packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/prior_to_test.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/prior_to_test.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/prior_to_test.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -23,7 +23,7 @@
#
#
########################################################################
-our $VERSION = 0.06;
+our $VERSION = '0.06';
########################################################################
Modified: packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/remove_file_and_try_executable_again.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/remove_file_and_try_executable_again.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/remove_file_and_try_executable_again.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -43,7 +43,7 @@
########################################################################
########################################################################
-our $VERSION = 0.07;
+our $VERSION = '0.07';
package remove_file_and_try_executable_again;
Modified: packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/test_in_further_subdir.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/test_in_further_subdir.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/contrib/automated_pp_test/test_in_further_subdir.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -22,7 +22,7 @@
#
##
########################################################################
-our $VERSION = 0.07;
+our $VERSION = '0.07';
########################################################################
Modified: packages/libpar-perl/branches/upstream/current/contrib/procedural_pp/pp_old
===================================================================
--- packages/libpar-perl/branches/upstream/current/contrib/procedural_pp/pp_old 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/contrib/procedural_pp/pp_old 2006-02-17 08:49:34 UTC (rev 2148)
@@ -646,7 +646,7 @@
sub show_version {
print << ".";
Perl Packager, version $VERSION (PAR version $PAR::VERSION)
-Copyright 2002, 2003, 2004 by Autrijus Tang <autrijus\@autrijus.org>
+Copyright 2002, 2003, 2004 by Audrey Tang <autrijus\@autrijus.org>
Neither this program nor the associated "parl" program impose any
licensing restrictions on files generated by their execution, in
@@ -1099,7 +1099,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -1109,7 +1109,7 @@
=head1 COPYRIGHT
-Copyright 2002, 2003, 2004 by Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>.
+Copyright 2002, 2003, 2004 by Audrey Tang E<lt>autrijus at autrijus.orgE<gt>.
Neither this program nor the associated L<parl> program impose any
licensing restrictions on files generated by their execution, in
Added: packages/libpar-perl/branches/upstream/current/inc/Module/AutoInstall.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Module/AutoInstall.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Module/AutoInstall.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -0,0 +1,716 @@
+#line 1 "inc/Module/AutoInstall.pm - /usr/local/lib/perl5/site_perl/5.8.7/Module/AutoInstall.pm"
+package Module::AutoInstall;
+$Module::AutoInstall::VERSION = '1.01';
+
+use strict;
+use Cwd ();
+use ExtUtils::MakeMaker ();
+
+#line 216
+
+# special map on pre-defined feature sets
+my %FeatureMap = (
+ '' => 'Core Features', # XXX: deprecated
+ '-core' => 'Core Features',
+);
+
+# various lexical flags
+my ( @Missing, @Existing, %DisabledTests, $UnderCPAN, $HasCPANPLUS );
+my ( $Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly );
+my ( $PostambleActions, $PostambleUsed );
+
+_accept_default( !-t STDIN ); # see if it's a non-interactive session
+_init();
+
+sub _accept_default {
+ $AcceptDefault = shift;
+}
+
+sub missing_modules {
+ return @Missing;
+}
+
+sub do_install {
+ __PACKAGE__->install(
+ [
+ $Config
+ ? ( UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} )
+ : ()
+ ],
+ @Missing,
+ );
+}
+
+# initialize various flags, and/or perform install
+sub _init {
+ foreach my $arg (
+ @ARGV,
+ split(
+ /[\s\t]+/,
+ $ENV{PERL_AUTOINSTALL} || $ENV{PERL_EXTUTILS_AUTOINSTALL} || ''
+ )
+ )
+ {
+ if ( $arg =~ /^--config=(.*)$/ ) {
+ $Config = [ split( ',', $1 ) ];
+ }
+ elsif ( $arg =~ /^--installdeps=(.*)$/ ) {
+ __PACKAGE__->install( $Config, @Missing = split( /,/, $1 ) );
+ exit 0;
+ }
+ elsif ( $arg =~ /^--default(?:deps)?$/ ) {
+ $AcceptDefault = 1;
+ }
+ elsif ( $arg =~ /^--check(?:deps)?$/ ) {
+ $CheckOnly = 1;
+ }
+ elsif ( $arg =~ /^--skip(?:deps)?$/ ) {
+ $SkipInstall = 1;
+ }
+ elsif ( $arg =~ /^--test(?:only)?$/ ) {
+ $TestOnly = 1;
+ }
+ }
+}
+
+# overrides MakeMaker's prompt() to automatically accept the default choice
+sub _prompt {
+ goto &ExtUtils::MakeMaker::prompt unless $AcceptDefault;
+
+ my ( $prompt, $default ) = @_;
+ my $y = ( $default =~ /^[Yy]/ );
+
+ print $prompt, ' [', ( $y ? 'Y' : 'y' ), '/', ( $y ? 'n' : 'N' ), '] ';
+ print "$default\n";
+ return $default;
+}
+
+# the workhorse
+sub import {
+ my $class = shift;
+ my @args = @_ or return;
+ my $core_all;
+
+ print "*** $class version " . $class->VERSION . "\n";
+ print "*** Checking for dependencies...\n";
+
+ my $cwd = Cwd::cwd();
+
+ $Config = [];
+
+ my $maxlen = length(
+ (
+ sort { length($b) <=> length($a) }
+ grep { /^[^\-]/ }
+ map {
+ ref($_)
+ ? ( ( ref($_) eq 'HASH' ) ? keys(%$_) : @{$_} )
+ : ''
+ }
+ map { +{@args}->{$_} }
+ grep { /^[^\-]/ or /^-core$/i } keys %{ +{@args} }
+ )[0]
+ );
+
+ while ( my ( $feature, $modules ) = splice( @args, 0, 2 ) ) {
+ my ( @required, @tests, @skiptests );
+ my $default = 1;
+ my $conflict = 0;
+
+ if ( $feature =~ m/^-(\w+)$/ ) {
+ my $option = lc($1);
+
+ # check for a newer version of myself
+ _update_to( $modules, @_ ) and return if $option eq 'version';
+
+ # sets CPAN configuration options
+ $Config = $modules if $option eq 'config';
+
+ # promote every features to core status
+ $core_all = ( $modules =~ /^all$/i ) and next
+ if $option eq 'core';
+
+ next unless $option eq 'core';
+ }
+
+ print "[" . ( $FeatureMap{ lc($feature) } || $feature ) . "]\n";
+
+ $modules = [ %{$modules} ] if UNIVERSAL::isa( $modules, 'HASH' );
+
+ unshift @$modules, -default => &{ shift(@$modules) }
+ if ( ref( $modules->[0] ) eq 'CODE' ); # XXX: bugward combatability
+
+ while ( my ( $mod, $arg ) = splice( @$modules, 0, 2 ) ) {
+ if ( $mod =~ m/^-(\w+)$/ ) {
+ my $option = lc($1);
+
+ $default = $arg if ( $option eq 'default' );
+ $conflict = $arg if ( $option eq 'conflict' );
+ @tests = @{$arg} if ( $option eq 'tests' );
+ @skiptests = @{$arg} if ( $option eq 'skiptests' );
+
+ next;
+ }
+
+ printf( "- %-${maxlen}s ...", $mod );
+
+ if ( $arg and $arg =~ /^\D/ ) {
+ unshift @$modules, $arg;
+ $arg = 0;
+ }
+
+ # XXX: check for conflicts and uninstalls(!) them.
+ if (
+ defined( my $cur = _version_check( _load($mod), $arg ||= 0 ) ) )
+ {
+ print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n";
+ push @Existing, $mod => $arg;
+ $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
+ }
+ else {
+ print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
+ push @required, $mod => $arg;
+ }
+ }
+
+ next unless @required;
+
+ my $mandatory = ( $feature eq '-core' or $core_all );
+
+ if (
+ !$SkipInstall
+ and (
+ $CheckOnly
+ or _prompt(
+ qq{==> Auto-install the }
+ . ( @required / 2 )
+ . ( $mandatory ? ' mandatory' : ' optional' )
+ . qq{ module(s) from CPAN?},
+ $default ? 'y' : 'n',
+ ) =~ /^[Yy]/
+ )
+ )
+ {
+ push( @Missing, @required );
+ $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
+ }
+
+ elsif ( !$SkipInstall
+ and $default
+ and $mandatory
+ and
+ _prompt( qq{==> The module(s) are mandatory! Really skip?}, 'n', )
+ =~ /^[Nn]/ )
+ {
+ push( @Missing, @required );
+ $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
+ }
+
+ else {
+ $DisabledTests{$_} = 1 for map { glob($_) } @tests;
+ }
+ }
+
+ _check_lock(); # check for $UnderCPAN
+
+ if ( @Missing and not( $CheckOnly or $UnderCPAN ) ) {
+ require Config;
+ print
+"*** Dependencies will be installed the next time you type '$Config::Config{make}'.\n";
+
+ # make an educated guess of whether we'll need root permission.
+ print " (You may need to do that as the 'root' user.)\n"
+ if eval '$>';
+ }
+ print "*** $class configuration finished.\n";
+
+ chdir $cwd;
+
+ # import to main::
+ no strict 'refs';
+ *{'main::WriteMakefile'} = \&Write if caller(0) eq 'main';
+}
+
+# CPAN.pm is non-reentrant, so check if we're under it and have no CPANPLUS
+sub _check_lock {
+ return unless @Missing;
+ return if _has_cpanplus();
+
+ require CPAN;
+ CPAN::Config->load;
+ my $lock = MM->catfile( $CPAN::Config->{cpan_home}, ".lock" );
+
+ if ( -f $lock
+ and open( LOCK, $lock )
+ and ( $^O eq 'MSWin32' ? _under_cpan() : <LOCK> == getppid() )
+ and ( $CPAN::Config->{prerequisites_policy} || '' ) ne 'ignore' )
+ {
+ print << '.';
+
+*** Since we're running under CPAN, I'll just let it take care
+ of the dependency's installation later.
+.
+ $UnderCPAN = 1;
+ }
+
+ close LOCK;
+}
+
+sub install {
+ my $class = shift;
+
+ my $i; # used below to strip leading '-' from config keys
+ my @config = ( map { s/^-// if ++$i; $_ } @{ +shift } );
+
+ my ( @modules, @installed );
+ while ( my ( $pkg, $ver ) = splice( @_, 0, 2 ) ) {
+
+ # grep out those already installed
+ if ( defined( _version_check( _load($pkg), $ver ) ) ) {
+ push @installed, $pkg;
+ }
+ else {
+ push @modules, $pkg, $ver;
+ }
+ }
+
+ return @installed unless @modules; # nothing to do
+
+ print "*** Installing dependencies...\n";
+
+ return unless _connected_to('cpan.org');
+
+ my %args = @config;
+ my %failed;
+ local *FAILED;
+ if ( $args{do_once} and open( FAILED, '.#autoinstall.failed' ) ) {
+ while (<FAILED>) { chomp; $failed{$_}++ }
+ close FAILED;
+
+ my @newmod;
+ while ( my ( $k, $v ) = splice( @modules, 0, 2 ) ) {
+ push @newmod, ( $k => $v ) unless $failed{$k};
+ }
+ @modules = @newmod;
+ }
+
+ if ( _has_cpanplus() ) {
+ _install_cpanplus( \@modules, \@config );
+ }
+ else {
+ _install_cpan( \@modules, \@config );
+ }
+
+ print "*** $class installation finished.\n";
+
+ # see if we have successfully installed them
+ while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {
+ if ( defined( _version_check( _load($pkg), $ver ) ) ) {
+ push @installed, $pkg;
+ }
+ elsif ( $args{do_once} and open( FAILED, '>> .#autoinstall.failed' ) ) {
+ print FAILED "$pkg\n";
+ }
+ }
+
+ close FAILED if $args{do_once};
+
+ return @installed;
+}
+
+sub _install_cpanplus {
+ my @modules = @{ +shift };
+ my @config = @{ +shift };
+ my $installed = 0;
+
+ require CPANPLUS::Backend;
+ my $cp = CPANPLUS::Backend->new;
+ my $conf = $cp->configure_object;
+
+ return unless $conf->can('conf') # 0.05x+ with "sudo" support
+ or _can_write($conf->_get_build('base')); # 0.04x
+
+ # if we're root, set UNINST=1 to avoid trouble unless user asked for it.
+ my $makeflags = $conf->get_conf('makeflags') || '';
+ if ( UNIVERSAL::isa( $makeflags, 'HASH' ) ) {
+
+ # 0.03+ uses a hashref here
+ $makeflags->{UNINST} = 1 unless exists $makeflags->{UNINST};
+ }
+ else {
+
+ # 0.02 and below uses a scalar
+ $makeflags = join( ' ', split( ' ', $makeflags ), 'UNINST=1' )
+ if ( $makeflags !~ /\bUNINST\b/ and eval qq{ $> eq '0' } );
+ }
+ $conf->set_conf( makeflags => $makeflags );
+ $conf->set_conf( prereqs => 1 );
+
+ while ( my ( $key, $val ) = splice( @config, 0, 2 ) ) {
+ eval { $conf->set_conf( $key, $val ) };
+ }
+
+ my $modtree = $cp->module_tree;
+ while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {
+ print "*** Installing $pkg...\n";
+
+ MY::preinstall( $pkg, $ver ) or next if defined &MY::preinstall;
+
+ my $success;
+ my $obj = $modtree->{$pkg};
+
+ if ( $obj and defined( _version_check( $obj->{version}, $ver ) ) ) {
+ my $pathname = $pkg;
+ $pathname =~ s/::/\\W/;
+
+ foreach my $inc ( grep { m/$pathname.pm/i } keys(%INC) ) {
+ delete $INC{$inc};
+ }
+
+ my $rv = $cp->install( modules => [ $obj->{module} ] );
+
+ if ( $rv and ( $rv->{ $obj->{module} } or $rv->{ok} ) ) {
+ print "*** $pkg successfully installed.\n";
+ $success = 1;
+ }
+ else {
+ print "*** $pkg installation cancelled.\n";
+ $success = 0;
+ }
+
+ $installed += $success;
+ }
+ else {
+ print << ".";
+*** Could not find a version $ver or above for $pkg; skipping.
+.
+ }
+
+ MY::postinstall( $pkg, $ver, $success ) if defined &MY::postinstall;
+ }
+
+ return $installed;
+}
+
+sub _install_cpan {
+ my @modules = @{ +shift };
+ my @config = @{ +shift };
+ my $installed = 0;
+ my %args;
+
+ require CPAN;
+ CPAN::Config->load;
+ require Config;
+
+ if (CPAN->VERSION < 1.80) {
+ # no "sudo" support, probe for writableness
+ return unless _can_write( MM->catfile( $CPAN::Config->{cpan_home}, 'sources' ) )
+ and _can_write( $Config::Config{sitelib} );
+ }
+
+ # if we're root, set UNINST=1 to avoid trouble unless user asked for it.
+ my $makeflags = $CPAN::Config->{make_install_arg} || '';
+ $CPAN::Config->{make_install_arg} =
+ join( ' ', split( ' ', $makeflags ), 'UNINST=1' )
+ if ( $makeflags !~ /\bUNINST\b/ and eval qq{ $> eq '0' } );
+
+ # don't show start-up info
+ $CPAN::Config->{inhibit_startup_message} = 1;
+
+ # set additional options
+ while ( my ( $opt, $arg ) = splice( @config, 0, 2 ) ) {
+ ( $args{$opt} = $arg, next )
+ if $opt =~ /^force$/; # pseudo-option
+ $CPAN::Config->{$opt} = $arg;
+ }
+
+ local $CPAN::Config->{prerequisites_policy} = 'follow';
+
+ while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {
+ MY::preinstall( $pkg, $ver ) or next if defined &MY::preinstall;
+
+ print "*** Installing $pkg...\n";
+
+ my $obj = CPAN::Shell->expand( Module => $pkg );
+ my $success = 0;
+
+ if ( $obj and defined( _version_check( $obj->cpan_version, $ver ) ) ) {
+ my $pathname = $pkg;
+ $pathname =~ s/::/\\W/;
+
+ foreach my $inc ( grep { m/$pathname.pm/i } keys(%INC) ) {
+ delete $INC{$inc};
+ }
+
+ $obj->force('install') if $args{force};
+
+ my $rv = $obj->install || eval {
+ $CPAN::META->instance( 'CPAN::Distribution', $obj->cpan_file, )
+ ->{install}
+ if $CPAN::META;
+ };
+
+ if ( $rv eq 'YES' ) {
+ print "*** $pkg successfully installed.\n";
+ $success = 1;
+ }
+ else {
+ print "*** $pkg installation failed.\n";
+ $success = 0;
+ }
+
+ $installed += $success;
+ }
+ else {
+ print << ".";
+*** Could not find a version $ver or above for $pkg; skipping.
+.
+ }
+
+ MY::postinstall( $pkg, $ver, $success ) if defined &MY::postinstall;
+ }
+
+ return $installed;
+}
+
+sub _has_cpanplus {
+ return (
+ $HasCPANPLUS = (
+ $INC{'CPANPLUS/Config.pm'}
+ or _load('CPANPLUS::Shell::Default')
+ )
+ );
+}
+
+# make guesses on whether we're under the CPAN installation directory
+sub _under_cpan {
+ require Cwd;
+ require File::Spec;
+
+ my $cwd = File::Spec->canonpath( Cwd::cwd() );
+ my $cpan = File::Spec->canonpath( $CPAN::Config->{cpan_home} );
+
+ return ( index( $cwd, $cpan ) > -1 );
+}
+
+sub _update_to {
+ my $class = __PACKAGE__;
+ my $ver = shift;
+
+ return
+ if defined( _version_check( _load($class), $ver ) ); # no need to upgrade
+
+ if (
+ _prompt( "==> A newer version of $class ($ver) is required. Install?",
+ 'y' ) =~ /^[Nn]/
+ )
+ {
+ die "*** Please install $class $ver manually.\n";
+ }
+
+ print << ".";
+*** Trying to fetch it from CPAN...
+.
+
+ # install ourselves
+ _load($class) and return $class->import(@_)
+ if $class->install( [], $class, $ver );
+
+ print << '.'; exit 1;
+
+*** Cannot bootstrap myself. :-( Installation terminated.
+.
+}
+
+# check if we're connected to some host, using inet_aton
+sub _connected_to {
+ my $site = shift;
+
+ return (
+ ( _load('Socket') and Socket::inet_aton($site) ) or _prompt(
+ qq(
+*** Your host cannot resolve the domain name '$site', which
+ probably means the Internet connections are unavailable.
+==> Should we try to install the required module(s) anyway?), 'n'
+ ) =~ /^[Yy]/
+ );
+}
+
+# check if a directory is writable; may create it on demand
+sub _can_write {
+ my $path = shift;
+ mkdir( $path, 0755 ) unless -e $path;
+
+ return 1 if -w $path;
+
+ print << ".";
+*** You are not allowed to write to the directory '$path';
+ the installation may fail due to insufficient permissions.
+.
+
+ if (
+ eval '$>' and lc(`sudo -V`) =~ /version/ and _prompt(
+ qq(
+==> Should we try to re-execute the autoinstall process with 'sudo'?),
+ ((-t STDIN) ? 'y' : 'n')
+ ) =~ /^[Yy]/
+ )
+ {
+
+ # try to bootstrap ourselves from sudo
+ print << ".";
+*** Trying to re-execute the autoinstall process with 'sudo'...
+.
+ my $missing = join( ',', @Missing );
+ my $config = join( ',',
+ UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} )
+ if $Config;
+
+ return
+ unless system( 'sudo', $^X, $0, "--config=$config",
+ "--installdeps=$missing" );
+
+ print << ".";
+*** The 'sudo' command exited with error! Resuming...
+.
+ }
+
+ return _prompt(
+ qq(
+==> Should we try to install the required module(s) anyway?), 'n'
+ ) =~ /^[Yy]/;
+}
+
+# load a module and return the version it reports
+sub _load {
+ my $mod = pop; # class/instance doesn't matter
+ my $file = $mod;
+
+ $file =~ s|::|/|g;
+ $file .= '.pm';
+
+ local $@;
+ return eval { require $file; $mod->VERSION } || ( $@ ? undef: 0 );
+}
+
+# compare two versions, either use Sort::Versions or plain comparison
+sub _version_check {
+ my ( $cur, $min ) = @_;
+ return unless defined $cur;
+
+ $cur =~ s/\s+$//;
+
+ # check for version numbers that are not in decimal format
+ if ( ref($cur) or ref($min) or $cur =~ /v|\..*\./ or $min =~ /v|\..*\./ ) {
+ if ( $version::VERSION or defined( _load('version') ) ) {
+
+ # use version.pm if it is installed.
+ return (
+ ( version->new($cur) >= version->new($min) ) ? $cur : undef );
+ }
+ elsif ( $Sort::Versions::VERSION or defined( _load('Sort::Versions') ) )
+ {
+
+ # use Sort::Versions as the sorting algorithm for a.b.c versions
+ return ( ( Sort::Versions::versioncmp( $cur, $min ) != -1 )
+ ? $cur
+ : undef );
+ }
+
+ warn "Cannot reliably compare non-decimal formatted versions.\n"
+ . "Please install version.pm or Sort::Versions.\n";
+ }
+
+ # plain comparison
+ local $^W = 0; # shuts off 'not numeric' bugs
+ return ( $cur >= $min ? $cur : undef );
+}
+
+# nothing; this usage is deprecated.
+sub main::PREREQ_PM { return {}; }
+
+sub _make_args {
+ my %args = @_;
+
+ $args{PREREQ_PM} = { %{ $args{PREREQ_PM} || {} }, @Existing, @Missing }
+ if $UnderCPAN or $TestOnly;
+
+ if ( $args{EXE_FILES} and -e 'MANIFEST' ) {
+ require ExtUtils::Manifest;
+ my $manifest = ExtUtils::Manifest::maniread('MANIFEST');
+
+ $args{EXE_FILES} =
+ [ grep { exists $manifest->{$_} } @{ $args{EXE_FILES} } ];
+ }
+
+ $args{test}{TESTS} ||= 't/*.t';
+ $args{test}{TESTS} = join( ' ',
+ grep { !exists( $DisabledTests{$_} ) }
+ map { glob($_) } split( /\s+/, $args{test}{TESTS} ) );
+
+ my $missing = join( ',', @Missing );
+ my $config =
+ join( ',', UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} )
+ if $Config;
+
+ $PostambleActions = (
+ $missing
+ ? "\$(PERL) $0 --config=$config --installdeps=$missing"
+ : "\@\$(NOOP)"
+ );
+
+ return %args;
+}
+
+# a wrapper to ExtUtils::MakeMaker::WriteMakefile
+sub Write {
+ require Carp;
+ Carp::croak "WriteMakefile: Need even number of args" if @_ % 2;
+
+ if ($CheckOnly) {
+ print << ".";
+*** Makefile not written in check-only mode.
+.
+ return;
+ }
+
+ my %args = _make_args(@_);
+
+ no strict 'refs';
+
+ $PostambleUsed = 0;
+ local *MY::postamble = \&postamble unless defined &MY::postamble;
+ ExtUtils::MakeMaker::WriteMakefile(%args);
+
+ print << "." unless $PostambleUsed;
+*** WARNING: Makefile written with customized MY::postamble() without
+ including contents from Module::AutoInstall::postamble() --
+ auto installation features disabled. Please contact the author.
+.
+
+ return 1;
+}
+
+sub postamble {
+ $PostambleUsed = 1;
+
+ return << ".";
+
+config :: installdeps
+\t\@\$(NOOP)
+
+checkdeps ::
+\t\$(PERL) $0 --checkdeps
+
+installdeps ::
+\t$PostambleActions
+
+.
+
+}
+
+1;
+
+__END__
+
+#line 943
Modified: packages/libpar-perl/branches/upstream/current/inc/Module/Install/AutoInstall.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Module/Install/AutoInstall.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Module/Install/AutoInstall.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -22,31 +22,31 @@
my @core = map @$_, map @$_, grep ref,
$self->build_requires, $self->requires;
- while ( @core and @_ > 1 and $_[0] =~ /^-\w+$/ ) {
- push @core, splice(@_, 0, 2);
- }
+ my @config = @_;
- # We'll need ExtUtils::AutoInstall
- $self->include('ExtUtils::AutoInstall');
- require ExtUtils::AutoInstall;
+ # We'll need Module::AutoInstall
+ $self->include('Module::AutoInstall');
+ require Module::AutoInstall;
- ExtUtils::AutoInstall->import(
- (@core ? (-core => \@core) : ()), @_, $self->features
+ Module::AutoInstall->import(
+ (@config ? (-config => \@config) : ()),
+ (@core ? (-core => \@core) : ()),
+ $self->features,
);
- $self->makemaker_args( ExtUtils::AutoInstall::_make_args() );
+ $self->makemaker_args( Module::AutoInstall::_make_args() );
my $class = ref($self);
$self->postamble(
"# --- $class section:\n" .
- ExtUtils::AutoInstall::postamble()
+ Module::AutoInstall::postamble()
);
}
sub auto_install_now {
my $self = shift;
- $self->auto_install;
- ExtUtils::AutoInstall::do_install();
+ $self->auto_install(@_);
+ Module::AutoInstall::do_install();
}
1;
Modified: packages/libpar-perl/branches/upstream/current/inc/Module/Install/Base.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Module/Install/Base.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Module/Install/Base.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,8 +1,11 @@
#line 1 "inc/Module/Install/Base.pm - /usr/local/lib/perl5/site_perl/5.8.7/Module/Install/Base.pm"
package Module::Install::Base;
-#line 28
+# Suspend handler for "redefined" warnings
+BEGIN { my $w = $SIG{__WARN__}; $SIG{__WARN__} = sub { $w } };
+#line 30
+
sub new {
my ($class, %args) = @_;
@@ -15,18 +18,21 @@
bless(\%args, $class);
}
-#line 46
+#line 48
sub AUTOLOAD {
my $self = shift;
- goto &{$self->_top->autoload};
+
+ local $@;
+ my $autoload = eval { $self->_top->autoload } or return;
+ goto &$autoload;
}
-#line 57
+#line 62
sub _top { $_[0]->{_top} }
-#line 68
+#line 73
sub admin {
my $self = shift;
@@ -49,6 +55,9 @@
1;
+# Restore warning handler
+BEGIN { $SIG{__WARN__} = $SIG{__WARN__}->() };
+
__END__
-#line 112
+#line 120
Modified: packages/libpar-perl/branches/upstream/current/inc/Module/Install/Can.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Module/Install/Can.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Module/Install/Can.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -8,6 +8,20 @@
use File::Spec ();
use ExtUtils::MakeMaker ();
+# check if we can load some module
+sub can_use {
+ my ($self, $mod, $ver) = @_;
+ $mod =~ s{::|\\}{/}g;
+ $mod .= ".pm" unless $mod =~ /\.pm$/i;
+
+ my $pkg = $mod;
+ $pkg =~ s{/}{::}g;
+ $pkg =~ s{\.pm$}{}i;
+
+ local $@;
+ eval { require $mod; $pkg->VERSION($ver || 0); 1 };
+}
+
# check if we can run some command
sub can_run {
my ($self, $cmd) = @_;
@@ -35,4 +49,21 @@
return;
}
+# Fix Cygwin bug on maybe_command();
+if ($^O eq 'cygwin') {
+ require ExtUtils::MM_Cygwin;
+ require ExtUtils::MM_Win32;
+ if (!defined(&ExtUtils::MM_Cygwin::maybe_command)) {
+ *ExtUtils::MM_Cygwin::maybe_command = sub {
+ my ($self, $file) = @_;
+ if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
+ ExtUtils::MM_Win32->maybe_command($file);
+ }
+ else {
+ ExtUtils::MM_Unix->maybe_command($file);
+ }
+ }
+ }
+}
+
1;
Modified: packages/libpar-perl/branches/upstream/current/inc/Module/Install/Makefile.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Module/Install/Makefile.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Module/Install/Makefile.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -23,6 +23,14 @@
$args;
}
+sub build_subdirs {
+ my $self = shift;
+ my $subdirs = $self->makemaker_args->{DIR} ||= [];
+ for my $subdir (@_) {
+ push @$subdirs, $subdir;
+ }
+}
+
sub clean_files {
my $self = shift;
my $clean = $self->makemaker_args->{clean} ||= {};
@@ -53,17 +61,18 @@
$args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
$args->{VERSION} = $self->version || $self->determine_VERSION($args);
$args->{NAME} =~ s/-/::/g;
- $args->{test} = {TESTS => $self->tests};
+ $args->{test} = {TESTS => $self->tests} if $self->tests;
+
if ($] >= 5.005) {
- $args->{ABSTRACT} = $self->abstract;
- $args->{AUTHOR} = $self->author;
+ $args->{ABSTRACT} = $self->abstract;
+ $args->{AUTHOR} = $self->author;
}
if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
$args->{NO_META} = 1;
}
if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 ) {
- $args->{SIGN} = 1 if $self->sign;
+ $args->{SIGN} = 1 if $self->sign;
}
delete $args->{SIGN} unless $self->is_admin;
@@ -73,10 +82,13 @@
($self->build_requires, $self->requires) );
# merge both kinds of requires into prereq_pm
- my $dir = ($args->{DIR} ||= []);
+ my $subdirs = ($args->{DIR} ||= []);
if ($self->bundles) {
- push @$dir, map "$_->[1]", @{$self->bundles};
- delete $prereq->{$_->[0]} for @{$self->bundles};
+ foreach my $bundle (@{ $self->bundles }) {
+ my ($file, $dir) = @$bundle;
+ push @$subdirs, $dir if -d $dir;
+ delete $prereq->{$file};
+ }
}
if (my $perl_version = $self->perl_version) {
@@ -107,6 +119,7 @@
my $postamble = "# Postamble by $top_class $top_version\n" .
($self->postamble || '');
+ local *MAKEFILE;
open MAKEFILE, '< Makefile' or die $!;
my $makefile = do { local $/; <MAKEFILE> };
close MAKEFILE;
@@ -141,4 +154,4 @@
__END__
-#line 274
+#line 286
Modified: packages/libpar-perl/branches/upstream/current/inc/Module/Install/Metadata.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Module/Install/Metadata.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Module/Install/Metadata.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,25 +1,33 @@
#line 1 "inc/Module/Install/Metadata.pm - /usr/local/lib/perl5/site_perl/5.8.7/Module/Install/Metadata.pm"
package Module::Install::Metadata;
-use Module::Install::Base; @ISA = qw(Module::Install::Base);
-$VERSION = '0.04';
-
use strict 'vars';
-use vars qw($VERSION);
+use Module::Install::Base;
-sub Meta { shift }
+use vars qw($VERSION @ISA);
+BEGIN {
+ $VERSION = '0.06';
+ @ISA = 'Module::Install::Base';
+}
-my @scalar_keys = qw(
- name module_name version abstract author license
- distribution_type sign perl_version tests
-);
-my @tuple_keys = qw(build_requires requires recommends bundles);
+my @scalar_keys = qw{
+ name module_name abstract author version license
+ distribution_type perl_version tests
+};
+my @tuple_keys = qw{
+ build_requires requires recommends bundles
+};
+
+sub Meta { shift }
+sub Meta_ScalarKeys { @scalar_keys }
+sub Meta_TupleKeys { @tuple_keys }
+
foreach my $key (@scalar_keys) {
*$key = sub {
my $self = shift;
- return $self->{'values'}{$key} unless @_;
- $self->{'values'}{$key} = shift;
+ return $self->{values}{$key} if defined wantarray and !@_;
+ $self->{values}{$key} = shift;
return $self;
};
}
@@ -27,122 +35,152 @@
foreach my $key (@tuple_keys) {
*$key = sub {
my $self = shift;
- return $self->{'values'}{$key} unless @_;
+ return $self->{values}{$key} unless @_;
+
my @rv;
while (@_) {
- my $module = shift or last;
+ my $module = shift or last;
my $version = shift || 0;
- if ($module eq 'perl') {
+ if ( $module eq 'perl' ) {
$version =~ s{^(\d+)\.(\d+)\.(\d+)}
{$1 + $2/1_000 + $3/1_000_000}e;
$self->perl_version($version);
next;
}
- my $rv = [$module, $version];
- push @{$self->{'values'}{$key}}, $rv;
+ my $rv = [ $module, $version ];
push @rv, $rv;
}
- return @rv;
+ push @{ $self->{values}{$key} }, @rv;
+ @rv;
};
}
-sub features {
+sub sign {
my $self = shift;
- while (my ($name, $mods) = splice(@_, 0, 2)) {
- my $count = 0;
- push @{$self->{'values'}{'features'}}, ($name => [
- map { (++$count % 2 and ref($_) and ($count += $#$_)) ? @$_ : $_ } @$mods
- ] );
+ return $self->{'values'}{'sign'} if defined wantarray and !@_;
+ $self->{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
+ return $self;
+}
+
+sub all_from {
+ my ( $self, $file ) = @_;
+
+ unless ( defined($file) ) {
+ my $name = $self->name
+ or die "all_from called with no args without setting name() first";
+ $file = join('/', 'lib', split(/-/, $name)) . '.pm';
+ $file =~ s{.*/}{} unless -e $file;
+ die "all_from: cannot find $file from $name" unless -e $file;
}
- return @{$self->{'values'}{'features'}};
+
+ $self->version_from($file) unless $self->version;
+ $self->perl_version_from($file) unless $self->perl_version;
+
+ # The remaining probes read from POD sections; if the file
+ # has an accompanying .pod, use that instead
+ my $pod = $file;
+ if ( $pod =~ s/\.pm$/.pod/i and -e $pod ) {
+ $file = $pod;
+ }
+
+ $self->author_from($file) unless $self->author;
+ $self->license_from($file) unless $self->license;
+ $self->abstract_from($file) unless $self->abstract;
}
-sub no_index {
- my $self = shift;
- my $type = shift;
- push @{$self->{'values'}{'no_index'}{$type}}, @_ if $type;
- return $self->{'values'}{'no_index'};
+sub provides {
+ my $self = shift;
+ my $provides = ( $self->{values}{provides} ||= {} );
+ %$provides = (%$provides, @_) if @_;
+ return $provides;
}
-sub _dump {
+sub auto_provides {
my $self = shift;
- my $package = ref($self->_top);
- my $version = $self->_top->VERSION;
- my %values = %{$self->{'values'}};
+ return $self unless $self->is_admin;
- delete $values{sign};
- if (my $perl_version = delete $values{perl_version}) {
- # Always canonical to three-dot version
- $perl_version =~ s{^(\d+)\.(\d\d\d)(\d*)}{join('.', $1, int($2), int($3))}e
- if $perl_version >= 5.006;
- $values{requires} = [
- [perl => $perl_version],
- @{$values{requires}||[]},
- ];
+ unless (-e 'MANIFEST') {
+ warn "Cannot deduce auto_provides without a MANIFEST, skipping\n";
+ return $self;
}
- warn "No license specified, setting license = 'unknown'\n"
- unless $values{license};
+ # Avoid spurious warnings as we are not checking manifest here.
- $values{license} ||= 'unknown';
- $values{distribution_type} ||= 'module';
- $values{name} ||= do {
- my $name = $values{module_name};
- $name =~ s/::/-/g;
- $name;
- } if $values{module_name};
+ local $SIG{__WARN__} = sub {1};
+ require ExtUtils::Manifest;
+ local *ExtUtils::Manifest::manicheck = sub { return };
- if ($values{name} =~ /::/) {
- my $name = $values{name};
- $name =~ s/::/-/g;
- die "Error in name(): '$values{name}' should be '$name'!\n";
- }
+ require Module::Build;
+ my $build = Module::Build->new(
+ dist_name => $self->{name},
+ dist_version => $self->{version},
+ license => $self->{license},
+ );
+ $self->provides(%{ $build->find_dist_packages || {} });
+}
- my $dump = '';
- foreach my $key (@scalar_keys) {
- $dump .= "$key: $values{$key}\n" if exists $values{$key};
- }
- foreach my $key (@tuple_keys) {
- next unless exists $values{$key};
- $dump .= "$key:\n";
- foreach (@{$values{$key}}) {
- $dump .= " $_->[0]: $_->[1]\n";
- }
- }
+sub feature {
+ my $self = shift;
+ my $name = shift;
+ my $features = ( $self->{values}{features} ||= [] );
- if (my $no_index = $values{no_index}) {
- push @{$no_index->{'directory'}}, 'inc';
- require YAML;
- local $YAML::UseHeader = 0;
- $dump .= YAML::Dump({ no_index => $no_index});
+ my $mods;
+
+ if ( @_ == 1 and ref( $_[0] ) ) {
+ # The user used ->feature like ->features by passing in the second
+ # argument as a reference. Accomodate for that.
+ $mods = $_[0];
}
else {
- $dump .= << "META";
-no_index:
- directory:
- - inc
-META
+ $mods = \@_;
}
-
- $dump .= "generated_by: $package version $version\n";
- return $dump;
+
+ my $count = 0;
+ push @$features, (
+ $name => [
+ map {
+ ref($_) ? ( ref($_) eq 'HASH' ) ? %$_
+ : @$_
+ : $_
+ } @$mods
+ ]
+ );
+
+ return @$features;
}
+sub features {
+ my $self = shift;
+ while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
+ $self->feature( $name, @$mods );
+ }
+ return @{ $self->{values}{features} };
+}
+
+sub no_index {
+ my $self = shift;
+ my $type = shift;
+ push @{ $self->{values}{no_index}{$type} }, @_ if $type;
+ return $self->{values}{no_index};
+}
+
sub read {
my $self = shift;
$self->include_deps( 'YAML', 0 );
+
require YAML;
- my $data = YAML::LoadFile( 'META.yml' );
+ my $data = YAML::LoadFile('META.yml');
+
# Call methods explicitly in case user has already set some values.
- while ( my ($key, $value) = each %$data ) {
- next unless $self->can( $key );
- if (ref $value eq 'HASH') {
- while (my ($module, $version) = each %$value) {
- $self->$key( $module => $version );
+ while ( my ( $key, $value ) = each %$data ) {
+ next unless $self->can($key);
+ if ( ref $value eq 'HASH' ) {
+ while ( my ( $module, $version ) = each %$value ) {
+ $self->can($key)->($self, $module => $version );
}
}
else {
- $self->$key( $value );
+ $self->can($key)->($self, $value);
}
}
return $self;
@@ -151,37 +189,113 @@
sub write {
my $self = shift;
return $self unless $self->is_admin;
-
- META_NOT_OURS: {
- local *FH;
- if (open FH, "META.yml") {
- while (<FH>) {
- last META_NOT_OURS if /^generated_by: Module::Install\b/;
- }
- return $self if -s FH;
- }
- }
-
- warn "Writing META.yml\n";
- open META, "> META.yml" or warn "Cannot write to META.yml: $!";
- print META $self->_dump;
- close META;
+ $self->admin->write_meta;
return $self;
}
sub version_from {
- my ($self, $version_from) = @_;
+ my ( $self, $file ) = @_;
require ExtUtils::MM_Unix;
- $self->version(ExtUtils::MM_Unix->parse_version($version_from));
+ $self->version( ExtUtils::MM_Unix->parse_version($file) );
}
sub abstract_from {
- my ($self, $abstract_from) = @_;
+ my ( $self, $file ) = @_;
require ExtUtils::MM_Unix;
$self->abstract(
- bless( { DISTNAME => $self->name }, 'ExtUtils::MM_Unix')
- ->parse_abstract($abstract_from)
- );
+ bless(
+ { DISTNAME => $self->name },
+ 'ExtUtils::MM_Unix'
+ )->parse_abstract($file)
+ );
}
+sub _slurp {
+ my ( $self, $file ) = @_;
+
+ local *FH;
+ open FH, "< $file" or die "Cannot open $file.pod: $!";
+ do { local $/; <FH> };
+}
+
+sub perl_version_from {
+ my ( $self, $file ) = @_;
+
+ if (
+ $self->_slurp($file) =~ m/
+ ^
+ use \s*
+ v?
+ ([\d\.]+)
+ \s* ;
+ /ixms
+ )
+ {
+ $self->perl_version($1);
+ }
+ else {
+ warn "Cannot determine perl version info from $file\n";
+ return;
+ }
+}
+
+sub author_from {
+ my ( $self, $file ) = @_;
+ my $content = $self->_slurp($file);
+ if ($content =~ m/
+ =head \d \s+ (?:authors?)\b \s*
+ ([^\n]*)
+ |
+ =head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s*
+ .*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s*
+ ([^\n]*)
+ /ixms) {
+ my $author = $1 || $2;
+ $author =~ s{E<lt>}{<}g;
+ $author =~ s{E<gt>}{>}g;
+ $self->author($author);
+ }
+ else {
+ warn "Cannot determine author info from $file\n";
+ }
+}
+
+sub license_from {
+ my ( $self, $file ) = @_;
+
+ if (
+ $self->_slurp($file) =~ m/
+ =head \d \s+
+ (?:licen[cs]e|licensing|copyright|legal)\b
+ (.*?)
+ (=head\\d.*|=cut.*|)
+ \z
+ /ixms
+ )
+ {
+ my $license_text = $1;
+ my @phrases = (
+ 'under the same (?:terms|license) as perl itself' => 'perl',
+ 'GNU public license' => 'gpl',
+ 'GNU lesser public license' => 'gpl',
+ 'BSD license' => 'bsd',
+ 'Artistic license' => 'artistic',
+ 'GPL' => 'gpl',
+ 'LGPL' => 'lgpl',
+ 'BSD' => 'bsd',
+ 'Artistic' => 'artistic',
+ );
+ while ( my ( $pattern, $license ) = splice( @phrases, 0, 2 ) ) {
+ $pattern =~ s{\s+}{\\s+}g;
+ if ( $license_text =~ /\b$pattern\b/i ) {
+ $self->license($license);
+ return 1;
+ }
+ }
+ }
+
+ warn "Cannot determine license info from $file\n";
+ return 'unknown';
+}
+
1;
Modified: packages/libpar-perl/branches/upstream/current/inc/Module/Install/PRIVATE/PAR.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Module/Install/PRIVATE/PAR.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Module/Install/PRIVATE/PAR.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,7 +1,3 @@
-#line 1 "inc/Module/Install/PRIVATE/PAR.pm - /usr/local/lib/perl5/site_perl/5.8.6/Module/Install/PRIVATE/PAR.pm"
-# $File: //member/autrijus/Module-Install-PRIVATE/lib/Module/Install/PRIVATE/PAR.pm $ $Author: autrijus $
-# $Revision: #14 $ $Change: 10724 $ $DateTime: 2004/06/02 11:57:09 $ vim: expandtab shiftwidth=4
-
package Module::Install::PRIVATE::PAR;
use Module::Install::Base; @ISA = qw(Module::Install::Base);
@@ -11,7 +7,7 @@
my %no_parl = ();
-sub Autrijus_PAR {
+sub par_prehook {
my $self = shift;
my $bork = $no_parl{$^O};
my $cc = $self->can_cc unless $bork;
@@ -82,7 +78,7 @@
);
}
-sub Autrijus_PAR_fix {
+sub par_posthook {
my $self = shift;
my $exe = $Config::Config{_exe};
Deleted: packages/libpar-perl/branches/upstream/current/inc/Module/Install/PRIVATE.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Module/Install/PRIVATE.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Module/Install/PRIVATE.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,28 +0,0 @@
-#line 1 "inc/Module/Install/PRIVATE.pm - /usr/local/lib/perl5/site_perl/5.8.6/Module/Install/PRIVATE.pm"
-# $File: //member/autrijus/Module-Install-PRIVATE/lib/Module/Install/PRIVATE.pm $ $Author: autrijus $
-# $Revision: #2 $ $Change: 5848 $ $DateTime: 2003/05/14 22:24:03 $ vim: expandtab shiftwidth=4
-
-package Module::Install::PRIVATE;
-use Module::Install::Base; @ISA = qw(Module::Install::Base);
-
-sub Autrijus { $_[0] }
-
-sub write {
- my ($self, $name) = @_;
-
- $self->author('Autrijus Tang (autrijus at autrijus.org)');
- $self->par_base('AUTRIJUS');
- $self->name($name ||= $self->name);
-
- my $method = "Autrijus_$name";
- $self->$method;
-}
-
-sub fix {
- my $self = shift;
- $name = $self->name;
- my $method = "Autrijus_${name}_fix";
- $self->$method;
-}
-
-1;
Modified: packages/libpar-perl/branches/upstream/current/inc/Module/Install/WriteAll.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Module/Install/WriteAll.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Module/Install/WriteAll.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -5,9 +5,9 @@
sub WriteAll {
my $self = shift;
my %args = (
- meta => 1,
- sign => 0,
- inline => 0,
+ meta => 1,
+ sign => 0,
+ inline => 0,
check_nmake => 1,
@_
);
@@ -17,10 +17,10 @@
$self->admin->WriteAll(%args) if $self->is_admin;
if ($0 =~ /Build.PL$/i) {
- $self->Build->write;
+ $self->Build->write;
}
else {
- $self->check_nmake if $args{check_nmake};
+ $self->check_nmake if $args{check_nmake};
$self->makemaker_args( PL_FILES => {} )
unless $self->makemaker_args->{'PL_FILES'};
Modified: packages/libpar-perl/branches/upstream/current/inc/Module/Install.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Module/Install.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Module/Install.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,8 +1,17 @@
-#line 1 "inc/Module/Install.pm - /usr/local/lib/perl5/site_perl/5.8.7/Module/Install.pm"
+#line 1 "/home/autrijus/work/par/inc/Module/Install.pm - /usr/local/lib/perl5/site_perl/5.8.7/Module/Install.pm"
package Module::Install;
-$VERSION = '0.39';
-die << "." unless $INC{join('/', inc => split(/::/, __PACKAGE__)).'.pm'};
+use 5.004;
+use strict 'vars';
+use vars qw{$VERSION};
+BEGIN {
+ # Don't forget to update Module::Install::Admin too!
+ $VERSION = '0.54';
+}
+
+# inc::Module::Install must be loaded first
+unless ( $INC{join('/', inc => split(/::/, __PACKAGE__)).'.pm'} ) {
+ die <<"END_DIE";
Please invoke ${\__PACKAGE__} with:
use inc::${\__PACKAGE__};
@@ -11,23 +20,40 @@
use ${\__PACKAGE__};
-.
+END_DIE
+}
-use strict 'vars';
-use Cwd ();
+use Cwd ();
+use FindBin;
use File::Find ();
use File::Path ();
- at inc::Module::Install::ISA = 'Module::Install';
*inc::Module::Install::VERSION = *VERSION;
+ at inc::Module::Install::ISA = 'Module::Install';
-#line 130
+sub autoload {
+ my $self = shift;
+ my $caller = $self->_caller;
+ my $cwd = Cwd::cwd();
+ my $sym = "$caller\::AUTOLOAD";
+ $sym->{$cwd} = sub {
+ my $pwd = Cwd::cwd();
+ if ( my $code = $sym->{$pwd} ) {
+ # delegate back to parent dirs
+ goto &$code unless $cwd eq $pwd;
+ }
+ $$sym =~ /([^:]+)$/ or die "Cannot autoload $caller - $sym";
+ unshift @_, ($self, $1);
+ goto &{$self->can('call')} unless uc($1) eq $1;
+ };
+}
+
sub import {
my $class = shift;
- my $self = $class->new(@_);
+ my $self = $class->new(@_);
- if (not -f $self->{file}) {
+ unless ( -f $self->{file} ) {
require "$self->{path}/$self->{dispatch}.pm";
File::Path::mkpath("$self->{prefix}/$self->{author}");
$self->{admin} =
@@ -37,44 +63,64 @@
goto &{"$self->{name}::import"};
}
- *{caller(0) . "::AUTOLOAD"} = $self->autoload;
+ *{$self->_caller . "::AUTOLOAD"} = $self->autoload;
+ $self->preload;
# Unregister loader and worker packages so subdirs can use them again
delete $INC{"$self->{file}"};
delete $INC{"$self->{path}.pm"};
}
-#line 157
+sub preload {
+ my ($self) = @_;
-sub autoload {
- my $self = shift;
- my $caller = caller;
+ unless ( $self->{extentions} ) {
+ $self->load_extensions(
+ "$self->{prefix}/$self->{path}", $self
+ );
+ }
- my $cwd = Cwd::cwd();
- my $sym = "$caller\::AUTOLOAD";
+ my @exts = @{$self->{extensions}};
+ unless ( @exts ) {
+ my $admin = $self->{admin};
+ @exts = $admin->load_all_extensions;
+ }
- $sym->{$cwd} = sub {
- my $pwd = Cwd::cwd();
- if (my $code = $sym->{$pwd}) {
- goto &$code unless $cwd eq $pwd; # delegate back to parent dirs
+ my %seen_method;
+ foreach my $obj ( @exts ) {
+ while (my ($method, $glob) = each %{ref($obj) . '::'}) {
+ next unless defined *{$glob}{CODE};
+ next if $method =~ /^_/;
+ next if $method eq uc($method);
+ $seen_method{$method}++;
}
- $$sym =~ /([^:]+)$/ or die "Cannot autoload $caller";
- unshift @_, ($self, $1);
- goto &{$self->can('call')} unless uc($1) eq $1;
- };
+ }
+
+ my $caller = $self->_caller;
+ foreach my $name (sort keys %seen_method) {
+ *{"${caller}::$name"} = sub {
+ ${"${caller}::AUTOLOAD"} = "${caller}::$name";
+ goto &{"${caller}::AUTOLOAD"};
+ };
+ }
}
-#line 182
-
sub new {
my ($class, %args) = @_;
+ # ignore the prefix on extension modules built from top level.
+ my $base_path = Cwd::abs_path($FindBin::Bin);
+ unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) {
+ delete $args{prefix};
+ }
+
return $args{_self} if $args{_self};
$args{dispatch} ||= 'Admin';
$args{prefix} ||= 'inc';
$args{author} ||= '.author';
$args{bundle} ||= 'inc/BUNDLES';
+ $args{base} ||= $base_path;
$class =~ s/^\Q$args{prefix}\E:://;
$args{name} ||= $class;
@@ -84,24 +130,20 @@
$args{path} = $args{name};
$args{path} =~ s!::!/!g;
}
- $args{file} ||= "$args{prefix}/$args{path}.pm";
+ $args{file} ||= "$args{base}/$args{prefix}/$args{path}.pm";
bless(\%args, $class);
}
-#line 211
-
sub call {
my $self = shift;
my $method = shift;
- my $obj = $self->load($method) or return;
+ my $obj = $self->load($method) or return;
unshift @_, $obj;
goto &{$obj->can($method)};
}
-#line 226
-
sub load {
my ($self, $method) = @_;
@@ -113,10 +155,10 @@
return $obj if $obj->can($method);
}
- my $admin = $self->{admin} or die << "END";
+ my $admin = $self->{admin} or die <<"END_DIE";
The '$method' method does not exist in the '$self->{prefix}' path!
Please remove the '$self->{prefix}' directory and run $0 again to load it.
-END
+END_DIE
my $obj = $admin->load($method, 1);
push @{$self->{extensions}}, $obj;
@@ -124,8 +166,6 @@
$obj;
}
-#line 256
-
sub load_extensions {
my ($self, $path, $top_obj) = @_;
@@ -137,33 +177,46 @@
my ($file, $pkg) = @{$rv};
next if $self->{pathnames}{$pkg};
- eval { require $file; 1 } or (warn($@), next);
+ local $@;
+ my $new = eval { require $file; $pkg->can('new') };
+ unless ( $new ) {
+ warn $@ if $@;
+ next;
+ }
$self->{pathnames}{$pkg} = delete $INC{$file};
- push @{$self->{extensions}}, $pkg->new( _top => $top_obj );
+ push @{$self->{extensions}}, &{$new}($pkg, _top => $top_obj );
}
+
+ $self->{extensions} ||= [];
}
-#line 280
-
sub find_extensions {
my ($self, $path) = @_;
+
my @found;
-
- File::Find::find(sub {
+ File::Find::find( sub {
my $file = $File::Find::name;
return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
return if $1 eq $self->{dispatch};
$file = "$self->{path}/$1.pm";
my $pkg = "$self->{name}::$1"; $pkg =~ s!/!::!g;
- push @found, [$file, $pkg];
- }, $path) if -d $path;
+ push @found, [ $file, $pkg ];
+ }, $path ) if -d $path;
@found;
}
-1;
+sub _caller {
+ my $depth = 0;
+ my $caller = caller($depth);
-__END__
+ while ($caller eq __PACKAGE__) {
+ $depth++;
+ $caller = caller($depth);
+ }
-#line 618
+ $caller;
+}
+
+1;
Added: packages/libpar-perl/branches/upstream/current/inc/Test/Builder/Module.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Test/Builder/Module.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Test/Builder/Module.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -0,0 +1,82 @@
+#line 1 "inc/Test/Builder/Module.pm - /usr/local/lib/perl5/site_perl/5.8.7/Test/Builder/Module.pm"
+package Test::Builder::Module;
+
+use Test::Builder;
+
+require Exporter;
+ at ISA = qw(Exporter);
+
+$VERSION = '0.03';
+
+use strict;
+
+# 5.004's Exporter doesn't have export_to_level.
+my $_export_to_level = sub {
+ my $pkg = shift;
+ my $level = shift;
+ (undef) = shift; # redundant arg
+ my $callpkg = caller($level);
+ $pkg->export($callpkg, @_);
+};
+
+
+#line 82
+
+sub import {
+ my($class) = shift;
+
+ my $test = $class->builder;
+
+ my $caller = caller;
+
+ $test->exported_to($caller);
+
+ $class->import_extra(\@_);
+ my(@imports) = $class->_strip_imports(\@_);
+
+ $test->plan(@_);
+
+ $class->$_export_to_level(1, $class, @imports);
+}
+
+
+sub _strip_imports {
+ my $class = shift;
+ my $list = shift;
+
+ my @imports = ();
+ my @other = ();
+ my $idx = 0;
+ while( $idx <= $#{$list} ) {
+ my $item = $list->[$idx];
+
+ if( defined $item and $item eq 'import' ) {
+ push @imports, @{$list->[$idx+1]};
+ $idx++;
+ }
+ else {
+ push @other, $item;
+ }
+
+ $idx++;
+ }
+
+ @$list = @other;
+
+ return @imports;
+}
+
+
+#line 144
+
+sub import_extra {}
+
+
+#line 175
+
+sub builder {
+ return Test::Builder->new;
+}
+
+
+1;
Modified: packages/libpar-perl/branches/upstream/current/inc/Test/Builder.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Test/Builder.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Test/Builder.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,4 +1,4 @@
-#line 1 "inc/Test/Builder.pm - /usr/local/lib/perl5/site_perl/5.8.6/Test/Builder.pm"
+#line 1 "inc/Test/Builder.pm - /usr/local/lib/perl5/site_perl/5.8.7/Test/Builder.pm"
package Test::Builder;
use 5.004;
@@ -9,7 +9,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = '0.30';
+$VERSION = '0.32';
$VERSION = eval $VERSION; # make the alpha version come out as a number
# Make Test::Builder thread-safe for ithreads.
@@ -66,7 +66,7 @@
}
-#line 128
+#line 127
my $Test = Test::Builder->new;
sub new {
@@ -76,7 +76,7 @@
}
-#line 150
+#line 149
sub create {
my $class = shift;
@@ -87,7 +87,7 @@
return $self;
}
-#line 169
+#line 168
use vars qw($Level);
@@ -122,7 +122,7 @@
return undef;
}
-#line 221
+#line 220
sub exported_to {
my($self, $pack) = @_;
@@ -133,7 +133,7 @@
return $self->{Exported_To};
}
-#line 243
+#line 242
sub plan {
my($self, $cmd, $arg) = @_;
@@ -172,7 +172,7 @@
return 1;
}
-#line 290
+#line 289
sub expected_tests {
my $self = shift;
@@ -191,7 +191,7 @@
}
-#line 315
+#line 314
sub no_plan {
my $self = shift;
@@ -200,7 +200,7 @@
$self->{Have_Plan} = 1;
}
-#line 330
+#line 329
sub has_plan {
my $self = shift;
@@ -211,7 +211,7 @@
};
-#line 348
+#line 347
sub skip_all {
my($self, $reason) = @_;
@@ -226,7 +226,7 @@
exit(0);
}
-#line 381
+#line 380
sub ok {
my($self, $test, $name) = @_;
@@ -244,7 +244,7 @@
$self->{Curr_Test}++;
# In case $name is a string overloaded object, force it to stringify.
- $self->_unoverload(\$name);
+ $self->_unoverload_str(\$name);
$self->diag(<<ERR) if defined $name and $name =~ /^[\d\s]+$/;
You named your test '$name'. You shouldn't use numbers for your test names.
@@ -254,7 +254,7 @@
my($pack, $file, $line) = $self->caller;
my $todo = $self->todo($pack);
- $self->_unoverload(\$todo);
+ $self->_unoverload_str(\$todo);
my $out;
my $result = &share({});
@@ -297,7 +297,14 @@
unless( $test ) {
my $msg = $todo ? "Failed (TODO)" : "Failed";
$self->_print_diag("\n") if $ENV{HARNESS_ACTIVE};
- $self->diag(" $msg test ($file at line $line)\n");
+
+ if( defined $name ) {
+ $self->diag(qq[ $msg test '$name'\n]);
+ $self->diag(qq[ in $file at line $line.\n]);
+ }
+ else {
+ $self->diag(qq[ $msg test in $file at line $line.\n]);
+ }
}
return $test ? 1 : 0;
@@ -306,6 +313,7 @@
sub _unoverload {
my $self = shift;
+ my $type = shift;
local($@,$!);
@@ -313,8 +321,8 @@
foreach my $thing (@_) {
eval {
- if( defined $$thing ) {
- if( my $string_meth = overload::Method($$thing, '""') ) {
+ if( _is_object($$thing) ) {
+ if( my $string_meth = overload::Method($$thing, $type) ) {
$$thing = $$thing->$string_meth();
}
}
@@ -323,12 +331,50 @@
}
-#line 492
+sub _is_object {
+ my $thing = shift;
+ return eval { ref $thing && $thing->isa('UNIVERSAL') } ? 1 : 0;
+}
+
+
+sub _unoverload_str {
+ my $self = shift;
+
+ $self->_unoverload(q[""], @_);
+}
+
+sub _unoverload_num {
+ my $self = shift;
+
+ $self->_unoverload('0+', @_);
+
+ for my $val (@_) {
+ next unless $self->_is_dualvar($$val);
+ $$val = $$val+0;
+ }
+}
+
+
+# This is a hack to detect a dualvar such as $!
+sub _is_dualvar {
+ my($self, $val) = @_;
+
+ local $^W = 0;
+ my $numval = $val+0;
+ return 1 if $numval != 0 and $numval ne $val;
+}
+
+
+
+#line 535
+
sub is_eq {
my($self, $got, $expect, $name) = @_;
local $Level = $Level + 1;
+ $self->_unoverload_str(\$got, \$expect);
+
if( !defined $got || !defined $expect ) {
# undef only matches undef and nothing else
my $test = !defined $got && !defined $expect;
@@ -345,6 +391,8 @@
my($self, $got, $expect, $name) = @_;
local $Level = $Level + 1;
+ $self->_unoverload_num(\$got, \$expect);
+
if( !defined $got || !defined $expect ) {
# undef only matches undef and nothing else
my $test = !defined $got && !defined $expect;
@@ -368,7 +416,7 @@
}
else {
# force numeric context
- $$val = $$val+0;
+ $self->_unoverload_num($val);
}
}
else {
@@ -383,7 +431,7 @@
}
-#line 566
+#line 613
sub isnt_eq {
my($self, $got, $dont_expect, $name) = @_;
@@ -418,7 +466,7 @@
}
-#line 618
+#line 665
sub like {
my($self, $this, $regex, $name) = @_;
@@ -434,7 +482,7 @@
$self->_regex_ok($this, $regex, '!~', $name);
}
-#line 659
+#line 706
sub maybe_regex {
@@ -463,8 +511,6 @@
sub _regex_ok {
my($self, $this, $regex, $cmp, $name) = @_;
- local $Level = $Level + 1;
-
my $ok = 0;
my $usable_regex = $self->maybe_regex($regex);
unless (defined $usable_regex) {
@@ -474,9 +520,19 @@
}
{
- local $^W = 0;
- my $test = $this =~ /$usable_regex/ ? 1 : 0;
+ my $test;
+ my $code = $self->_caller_context;
+
+ local($@, $!);
+
+ # Yes, it has to look like this or 5.4.5 won't see the #line directive.
+ # Don't ask me, man, I just work here.
+ $test = eval "
+$code" . q{$test = $this =~ /$usable_regex/ ? 1 : 0};
+
$test = !$test if $cmp eq '!~';
+
+ local $Level = $Level + 1;
$ok = $self->ok( $test, $name );
}
@@ -493,17 +549,35 @@
return $ok;
}
-#line 726
+#line 781
+
+my %numeric_cmps = map { ($_, 1) }
+ ("<", "<=", ">", ">=", "==", "!=", "<=>");
+
sub cmp_ok {
my($self, $got, $type, $expect, $name) = @_;
+ # Treat overloaded objects as numbers if we're asked to do a
+ # numeric comparison.
+ my $unoverload = $numeric_cmps{$type} ? '_unoverload_num'
+ : '_unoverload_str';
+
+ $self->$unoverload(\$got, \$expect);
+
+
my $test;
{
- local $^W = 0;
local($@,$!); # don't interfere with $@
# eval() sometimes resets $!
- $test = eval "\$got $type \$expect";
+
+ my $code = $self->_caller_context;
+
+ # Yes, it has to look like this or 5.4.5 won't see the #line directive.
+ # Don't ask me, man, I just work here.
+ $test = eval "
+$code" . "\$got $type \$expect;";
+
}
local $Level = $Level + 1;
my $ok = $self->ok($test, $name);
@@ -531,21 +605,40 @@
DIAGNOSTIC
}
-#line 774
-sub BAILOUT {
+sub _caller_context {
+ my $self = shift;
+
+ my($pack, $file, $line) = $self->caller(1);
+
+ my $code = '';
+ $code .= "#line $line $file\n" if defined $file and defined $line;
+
+ return $code;
+}
+
+
+#line 860
+
+sub BAIL_OUT {
my($self, $reason) = @_;
+ $self->{Bailed_Out} = 1;
$self->_print("Bail out! $reason");
exit 255;
}
-#line 790
+#line 873
+*BAILOUT = \&BAIL_OUT;
+
+
+#line 885
+
sub skip {
my($self, $why) = @_;
$why ||= '';
- $self->_unoverload(\$why);
+ $self->_unoverload_str(\$why);
unless( $self->{Have_Plan} ) {
require Carp;
@@ -575,7 +668,7 @@
}
-#line 835
+#line 930
sub todo_skip {
my($self, $why) = @_;
@@ -607,7 +700,7 @@
}
-#line 906
+#line 1001
sub level {
my($self, $level) = @_;
@@ -619,7 +712,7 @@
}
-#line 941
+#line 1036
sub use_numbers {
my($self, $use_nums) = @_;
@@ -630,31 +723,32 @@
return $self->{Use_Nums};
}
-#line 967
-sub no_header {
- my($self, $no_header) = @_;
+#line 1070
- if( defined $no_header ) {
- $self->{No_Header} = $no_header;
- }
- return $self->{No_Header};
-}
+foreach my $attribute (qw(No_Header No_Ending No_Diag)) {
+ my $method = lc $attribute;
-sub no_ending {
- my($self, $no_ending) = @_;
+ my $code = sub {
+ my($self, $no) = @_;
- if( defined $no_ending ) {
- $self->{No_Ending} = $no_ending;
- }
- return $self->{No_Ending};
+ if( defined $no ) {
+ $self->{$attribute} = $no;
+ }
+ return $self->{$attribute};
+ };
+
+ no strict 'refs';
+ *{__PACKAGE__.'::'.$method} = $code;
}
-#line 1023
+#line 1124
sub diag {
my($self, @msgs) = @_;
+
+ return if $self->no_diag;
return unless @msgs;
# Prevent printing headers when compiling (i.e. -c)
@@ -676,7 +770,7 @@
return 0;
}
-#line 1058
+#line 1161
sub _print {
my($self, @msgs) = @_;
@@ -701,7 +795,7 @@
}
-#line 1089
+#line 1192
sub _print_diag {
my $self = shift;
@@ -711,7 +805,7 @@
print $fh @_;
}
-#line 1126
+#line 1229
sub output {
my($self, $fh) = @_;
@@ -761,6 +855,7 @@
sub _is_fh {
my $maybe_fh = shift;
+ return 0 unless defined $maybe_fh;
return 1 if ref \$maybe_fh eq 'GLOB'; # its a glob
@@ -809,7 +904,7 @@
}
-#line 1243
+#line 1347
sub current_test {
my($self, $num) = @_;
@@ -846,7 +941,7 @@
}
-#line 1289
+#line 1393
sub summary {
my($self) = shift;
@@ -854,14 +949,14 @@
return map { $_->{'ok'} } @{ $self->{Test_Results} };
}
-#line 1344
+#line 1448
sub details {
my $self = shift;
return @{ $self->{Test_Results} };
}
-#line 1369
+#line 1473
sub todo {
my($self, $pack) = @_;
@@ -874,7 +969,7 @@
: 0;
}
-#line 1390
+#line 1494
sub caller {
my($self, $height) = @_;
@@ -884,9 +979,9 @@
return wantarray ? @caller : $caller[0];
}
-#line 1402
+#line 1506
-#line 1416
+#line 1520
#'#
sub _sanity_check {
@@ -899,7 +994,7 @@
'Somehow you got a different number of results than tests ran!');
}
-#line 1437
+#line 1541
sub _whoa {
my($check, $desc) = @_;
@@ -911,7 +1006,7 @@
}
}
-#line 1458
+#line 1562
sub _my_exit {
$? = $_[0];
@@ -920,7 +1015,7 @@
}
-#line 1471
+#line 1575
$SIG{__DIE__} = sub {
# We don't want to muck with death in an eval, but $^S isn't
@@ -943,8 +1038,11 @@
# should do the ending.
# Exit if plan() was never called. This is so "require Test::Simple"
# doesn't puke.
- if( ($self->{Original_Pid} != $$) or
- (!$self->{Have_Plan} && !$self->{Test_Died}) )
+ # Don't do an ending if we bailed out.
+ if( ($self->{Original_Pid} != $$) or
+ (!$self->{Have_Plan} && !$self->{Test_Died}) or
+ $self->{Bailed_Out}
+ )
{
_my_exit($?);
return;
@@ -969,26 +1067,31 @@
}
my $num_failed = grep !$_->{'ok'},
- @{$test_results}[0..$self->{Expected_Tests}-1];
- $num_failed += abs($self->{Expected_Tests} - @$test_results);
+ @{$test_results}[0..$self->{Curr_Test}-1];
- if( $self->{Curr_Test} < $self->{Expected_Tests} ) {
+ my $num_extra = $self->{Curr_Test} - $self->{Expected_Tests};
+
+ if( $num_extra < 0 ) {
my $s = $self->{Expected_Tests} == 1 ? '' : 's';
$self->diag(<<"FAIL");
Looks like you planned $self->{Expected_Tests} test$s but only ran $self->{Curr_Test}.
FAIL
}
- elsif( $self->{Curr_Test} > $self->{Expected_Tests} ) {
- my $num_extra = $self->{Curr_Test} - $self->{Expected_Tests};
+ elsif( $num_extra > 0 ) {
my $s = $self->{Expected_Tests} == 1 ? '' : 's';
$self->diag(<<"FAIL");
Looks like you planned $self->{Expected_Tests} test$s but ran $num_extra extra.
FAIL
}
- elsif ( $num_failed ) {
+
+ if ( $num_failed ) {
+ my $num_tests = $self->{Curr_Test};
my $s = $num_failed == 1 ? '' : 's';
+
+ my $qualifier = $num_extra == 0 ? '' : ' run';
+
$self->diag(<<"FAIL");
-Looks like you failed $num_failed test$s of $self->{Expected_Tests}.
+Looks like you failed $num_failed test$s of $num_tests$qualifier.
FAIL
}
@@ -1000,7 +1103,18 @@
_my_exit( 255 ) && return;
}
- _my_exit( $num_failed <= 254 ? $num_failed : 254 ) && return;
+ my $exit_code;
+ if( $num_failed ) {
+ $exit_code = $num_failed <= 254 ? $num_failed : 254;
+ }
+ elsif( $num_extra != 0 ) {
+ $exit_code = 255;
+ }
+ else {
+ $exit_code = 0;
+ }
+
+ _my_exit( $exit_code ) && return;
}
elsif ( $self->{Skip_All} ) {
_my_exit( 0 ) && return;
@@ -1021,6 +1135,6 @@
$Test->_ending if defined $Test and !$Test->no_ending;
}
-#line 1624
+#line 1747
1;
Modified: packages/libpar-perl/branches/upstream/current/inc/Test/More.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/inc/Test/More.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/inc/Test/More.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,10 +1,9 @@
-#line 1 "inc/Test/More.pm - /usr/local/lib/perl5/site_perl/5.8.6/Test/More.pm"
+#line 1 "inc/Test/More.pm - /usr/local/lib/perl5/site_perl/5.8.7/Test/More.pm"
package Test::More;
use 5.004;
use strict;
-use Test::Builder;
# Can't use Carp because it might cause use_ok() to accidentally succeed
@@ -17,12 +16,12 @@
-require Exporter;
use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS $TODO);
-$VERSION = '0.60';
+$VERSION = '0.62';
$VERSION = eval $VERSION; # make the alpha version come out as a number
- at ISA = qw(Exporter);
+use Test::Builder::Module;
+ at ISA = qw(Test::Builder::Module);
@EXPORT = qw(ok use_ok require_ok
is isnt like unlike is_deeply
cmp_ok
@@ -33,126 +32,107 @@
plan
can_ok isa_ok
diag
+ BAIL_OUT
);
-my $Test = Test::Builder->new;
-my $Show_Diag = 1;
+#line 157
-# 5.004's Exporter doesn't have export_to_level.
-sub _export_to_level
-{
- my $pkg = shift;
- my $level = shift;
- (undef) = shift; # redundant arg
- my $callpkg = caller($level);
- $pkg->export($callpkg, @_);
-}
-
-
-#line 173
-
sub plan {
- my(@plan) = @_;
+ my $tb = Test::More->builder;
- my $idx = 0;
- my @cleaned_plan;
- while( $idx <= $#plan ) {
- my $item = $plan[$idx];
-
- if( $item eq 'no_diag' ) {
- $Show_Diag = 0;
- }
- else {
- push @cleaned_plan, $item;
- }
-
- $idx++;
- }
-
- $Test->plan(@cleaned_plan);
+ $tb->plan(@_);
}
-sub import {
- my($class) = shift;
- my $caller = caller;
+# This implements "use Test::More 'no_diag'" but the behavior is
+# deprecated.
+sub import_extra {
+ my $class = shift;
+ my $list = shift;
- $Test->exported_to($caller);
-
+ my @other = ();
my $idx = 0;
- my @plan;
- my @imports;
- while( $idx <= $#_ ) {
- my $item = $_[$idx];
+ while( $idx <= $#{$list} ) {
+ my $item = $list->[$idx];
- if( $item eq 'import' ) {
- push @imports, @{$_[$idx+1]};
- $idx++;
+ if( defined $item and $item eq 'no_diag' ) {
+ $class->builder->no_diag(1);
}
else {
- push @plan, $item;
+ push @other, $item;
}
$idx++;
}
- plan(@plan);
-
- __PACKAGE__->_export_to_level(1, __PACKAGE__, @imports);
+ @$list = @other;
}
-#line 291
+#line 257
sub ok ($;$) {
my($test, $name) = @_;
- $Test->ok($test, $name);
+ my $tb = Test::More->builder;
+
+ $tb->ok($test, $name);
}
-#line 355
+#line 324
sub is ($$;$) {
- $Test->is_eq(@_);
+ my $tb = Test::More->builder;
+
+ $tb->is_eq(@_);
}
sub isnt ($$;$) {
- $Test->isnt_eq(@_);
+ my $tb = Test::More->builder;
+
+ $tb->isnt_eq(@_);
}
*isn't = \&isnt;
-#line 396
+#line 369
sub like ($$;$) {
- $Test->like(@_);
+ my $tb = Test::More->builder;
+
+ $tb->like(@_);
}
-#line 410
+#line 385
sub unlike ($$;$) {
- $Test->unlike(@_);
+ my $tb = Test::More->builder;
+
+ $tb->unlike(@_);
}
-#line 448
+#line 425
sub cmp_ok($$$;$) {
- $Test->cmp_ok(@_);
+ my $tb = Test::More->builder;
+
+ $tb->cmp_ok(@_);
}
-#line 482
+#line 461
sub can_ok ($@) {
my($proto, @methods) = @_;
my $class = ref $proto || $proto;
+ my $tb = Test::More->builder;
unless( @methods ) {
- my $ok = $Test->ok( 0, "$class->can(...)" );
- $Test->diag(' can_ok() called with no methods');
+ my $ok = $tb->ok( 0, "$class->can(...)" );
+ $tb->diag(' can_ok() called with no methods');
return $ok;
}
@@ -167,17 +147,18 @@
$name = @methods == 1 ? "$class->can('$methods[0]')"
: "$class->can(...)";
- my $ok = $Test->ok( !@nok, $name );
+ my $ok = $tb->ok( !@nok, $name );
- $Test->diag(map " $class->can('$_') failed\n", @nok);
+ $tb->diag(map " $class->can('$_') failed\n", @nok);
return $ok;
}
-#line 539
+#line 519
sub isa_ok ($$;$) {
my($object, $class, $obj_name) = @_;
+ my $tb = Test::More->builder;
my $diag;
$obj_name = 'The object' unless defined $obj_name;
@@ -217,40 +198,35 @@
my $ok;
if( $diag ) {
- $ok = $Test->ok( 0, $name );
- $Test->diag(" $diag\n");
+ $ok = $tb->ok( 0, $name );
+ $tb->diag(" $diag\n");
}
else {
- $ok = $Test->ok( 1, $name );
+ $ok = $tb->ok( 1, $name );
}
return $ok;
}
-#line 608
+#line 589
sub pass (;$) {
- $Test->ok(1, @_);
+ my $tb = Test::More->builder;
+ $tb->ok(1, @_);
}
sub fail (;$) {
- $Test->ok(0, @_);
+ my $tb = Test::More->builder;
+ $tb->ok(0, @_);
}
-#line 661
+#line 650
-sub diag {
- return unless $Show_Diag;
- $Test->diag(@_);
-}
-
-
-#line 717
-
sub use_ok ($;@) {
my($module, @imports) = @_;
@imports = () unless @imports;
+ my $tb = Test::More->builder;
my($pack,$filename,$line) = caller;
@@ -271,13 +247,13 @@
USE
}
- my $ok = $Test->ok( !$@, "use $module;" );
+ my $ok = $tb->ok( !$@, "use $module;" );
unless( $ok ) {
chomp $@;
$@ =~ s{^BEGIN failed--compilation aborted at .*$}
{BEGIN failed--compilation aborted at $filename line $line.}m;
- $Test->diag(<<DIAGNOSTIC);
+ $tb->diag(<<DIAGNOSTIC);
Tried to use '$module'.
Error: $@
DIAGNOSTIC
@@ -287,10 +263,11 @@
return $ok;
}
-#line 765
+#line 699
sub require_ok ($) {
my($module) = shift;
+ my $tb = Test::More->builder;
my $pack = caller;
@@ -304,11 +281,11 @@
require $module;
REQUIRE
- my $ok = $Test->ok( !$@, "require $module;" );
+ my $ok = $tb->ok( !$@, "require $module;" );
unless( $ok ) {
chomp $@;
- $Test->diag(<<DIAGNOSTIC);
+ $tb->diag(<<DIAGNOSTIC);
Tried to require '$module'.
Error: $@
DIAGNOSTIC
@@ -329,53 +306,13 @@
$module =~ /^[a-zA-Z]\w*$/;
}
-#line 866
+#line 775
-#'#
-sub skip {
- my($why, $how_many) = @_;
-
- unless( defined $how_many ) {
- # $how_many can only be avoided when no_plan is in use.
- _carp "skip() needs to know \$how_many tests are in the block"
- unless $Test->has_plan eq 'no_plan';
- $how_many = 1;
- }
-
- for( 1..$how_many ) {
- $Test->skip($why);
- }
-
- local $^W = 0;
- last SKIP;
-}
-
-
-#line 947
-
-sub todo_skip {
- my($why, $how_many) = @_;
-
- unless( defined $how_many ) {
- # $how_many can only be avoided when no_plan is in use.
- _carp "todo_skip() needs to know \$how_many tests are in the block"
- unless $Test->has_plan eq 'no_plan';
- $how_many = 1;
- }
-
- for( 1..$how_many ) {
- $Test->todo_skip($why);
- }
-
- local $^W = 0;
- last TODO;
-}
-
-#line 1003
-
use vars qw(@Data_Stack %Refs_Seen);
my $DNE = bless [], 'Does::Not::Exist';
sub is_deeply {
+ my $tb = Test::More->builder;
+
unless( @_ == 2 or @_ == 3 ) {
my $msg = <<WARNING;
is_deeply() takes two or three args, you gave %d.
@@ -386,27 +323,29 @@
_carp sprintf $msg, scalar @_;
- return $Test->ok(0);
+ return $tb->ok(0);
}
my($this, $that, $name) = @_;
+ $tb->_unoverload_str(\$that, \$this);
+
my $ok;
if( !ref $this and !ref $that ) { # neither is a reference
- $ok = $Test->is_eq($this, $that, $name);
+ $ok = $tb->is_eq($this, $that, $name);
}
elsif( !ref $this xor !ref $that ) { # one's a reference, one isn't
- $ok = $Test->ok(0, $name);
- $Test->diag( _format_stack({ vals => [ $this, $that ] }) );
+ $ok = $tb->ok(0, $name);
+ $tb->diag( _format_stack({ vals => [ $this, $that ] }) );
}
else { # both references
local @Data_Stack = ();
if( _deep_check($this, $that) ) {
- $ok = $Test->ok(1, $name);
+ $ok = $tb->ok(1, $name);
}
else {
- $ok = $Test->ok(0, $name);
- $Test->diag(_format_stack(@Data_Stack));
+ $ok = $tb->ok(0, $name);
+ $tb->diag(_format_stack(@Data_Stack));
}
}
@@ -461,17 +400,78 @@
return '' if !ref $thing;
- for my $type (qw(ARRAY HASH REF SCALAR GLOB Regexp)) {
+ for my $type (qw(ARRAY HASH REF SCALAR GLOB CODE Regexp)) {
return $type if UNIVERSAL::isa($thing, $type);
}
return '';
}
+#line 915
-#line 1127
+sub diag {
+ my $tb = Test::More->builder;
+ $tb->diag(@_);
+}
+
+
+#line 984
+
#'#
+sub skip {
+ my($why, $how_many) = @_;
+ my $tb = Test::More->builder;
+
+ unless( defined $how_many ) {
+ # $how_many can only be avoided when no_plan is in use.
+ _carp "skip() needs to know \$how_many tests are in the block"
+ unless $tb->has_plan eq 'no_plan';
+ $how_many = 1;
+ }
+
+ for( 1..$how_many ) {
+ $tb->skip($why);
+ }
+
+ local $^W = 0;
+ last SKIP;
+}
+
+
+#line 1066
+
+sub todo_skip {
+ my($why, $how_many) = @_;
+ my $tb = Test::More->builder;
+
+ unless( defined $how_many ) {
+ # $how_many can only be avoided when no_plan is in use.
+ _carp "todo_skip() needs to know \$how_many tests are in the block"
+ unless $tb->has_plan eq 'no_plan';
+ $how_many = 1;
+ }
+
+ for( 1..$how_many ) {
+ $tb->todo_skip($why);
+ }
+
+ local $^W = 0;
+ last TODO;
+}
+
+#line 1119
+
+sub BAIL_OUT {
+ my $reason = shift;
+ my $tb = Test::More->builder;
+
+ $tb->BAIL_OUT($reason);
+}
+
+#line 1158
+
+#'#
sub eq_array {
local @Data_Stack;
_deep_check(@_);
@@ -505,6 +505,8 @@
sub _deep_check {
my($e1, $e2) = @_;
+ my $tb = Test::More->builder;
+
my $ok = 0;
# Effectively turn %Refs_Seen into a stack. This avoids picking up
@@ -516,7 +518,7 @@
# Quiet uninitialized value warnings when comparing undefs.
local $^W = 0;
- $Test->_unoverload(\$e1, \$e2);
+ $tb->_unoverload_str(\$e1, \$e2);
# Either they're both references or both not.
my $same_ref = !(!ref $e1 xor !ref $e2);
@@ -566,6 +568,10 @@
$ok = _deep_check($$e1, $$e2);
pop @Data_Stack if $ok;
}
+ elsif( $type ) {
+ push @Data_Stack, { type => $type, vals => [$e1, $e2] };
+ $ok = 0;
+ }
else {
_whoa(1, "No type in _deep_check");
}
@@ -587,7 +593,7 @@
}
-#line 1252
+#line 1289
sub eq_hash {
local @Data_Stack;
@@ -620,7 +626,7 @@
return $ok;
}
-#line 1304
+#line 1346
sub eq_set {
my($a1, $a2) = @_;
@@ -629,23 +635,23 @@
# There's faster ways to do this, but this is easiest.
local $^W = 0;
- # We must make sure that references are treated neutrally. It really
- # doesn't matter how we sort them, as long as both arrays are sorted
- # with the same algorithm.
+ # It really doesn't matter how we sort them, as long as both arrays are
+ # sorted with the same algorithm.
+ #
+ # Ensure that references are not accidentally treated the same as a
+ # string containing the reference.
+ #
# Have to inline the sort routine due to a threading/sort bug.
# See [rt.cpan.org 6782]
+ #
+ # I don't know how references would be sorted so we just don't sort
+ # them. This means eq_set doesn't really work with refs.
return eq_array(
- [sort { ref $a ? -1 : ref $b ? 1 : $a cmp $b } @$a1],
- [sort { ref $a ? -1 : ref $b ? 1 : $a cmp $b } @$a2]
+ [grep(ref, @$a1), sort( grep(!ref, @$a1) )],
+ [grep(ref, @$a2), sort( grep(!ref, @$a2) )],
);
}
-#line 1347
+#line 1534
-sub builder {
- return Test::Builder->new;
-}
-
-#line 1489
-
1;
Modified: packages/libpar-perl/branches/upstream/current/lib/App/Packer/PAR.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/lib/App/Packer/PAR.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/lib/App/Packer/PAR.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -4,7 +4,7 @@
use vars qw($VERSION);
use Config;
-$VERSION = '0.13';
+$VERSION = '0.91';
sub new {
my ($type, %args) = @_;
@@ -193,13 +193,13 @@
=head1 AUTHOR
-Code modifications by Edward S. Peschko. This documentation by Autrijus Tang.
+Code modifications by Edward S. Peschko. This documentation by Audrey Tang.
Based on the work of Mattia Barbon E<lt>mbarbon at dsi.unive.itE<gt>.
=head1 COPYRIGHT
-Copyright 2004, 2005 by Edward S. Peschko, Autrijus Tang and Mattia Barbon.
+Copyright 2004, 2005, 2006 by Edward S. Peschko, Audrey Tang and Mattia Barbon.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/lib/PAR/FAQ.pod
===================================================================
--- packages/libpar-perl/branches/upstream/current/lib/PAR/FAQ.pod 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/lib/PAR/FAQ.pod 2006-02-17 08:49:34 UTC (rev 2148)
@@ -202,7 +202,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -212,7 +212,7 @@
=head1 COPYRIGHT
-Copyright 2003, 2004, 2005 by Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>.
+Copyright 2003, 2004, 2005, 2006 by Audrey Tang E<lt>autrijus at autrijus.orgE<gt>.
This document is free documentation; you can redistribute it and/or
modify it under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/Bleach.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/Bleach.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/Bleach.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -25,7 +25,7 @@
$$ref = unpack("b*", $$ref);
$$ref =~ tr/01/ \t/;
$$ref =~ s/(.{9})/$1\n/g;
- $$ref = q($_=<<'';y;\r\n;;d;$_=pack'b*',$_;eval;$@&&die$@)."\n$$ref\n\n";
+ $$ref = q($_=<<'';y;\r\n;;d;$_=pack'b*',$_;$_=eval;$@&&die$@;$_)."\n$$ref\n\n";
}
1;
@@ -36,7 +36,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -46,7 +46,7 @@
=head1 COPYRIGHT
-Copyright 2003, 2004, 2005 by Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>.
+Copyright 2003, 2004, 2005, 2006 by Audrey Tang E<lt>autrijus at autrijus.orgE<gt>.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/Bytecode.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/Bytecode.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/Bytecode.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -65,7 +65,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -75,7 +75,7 @@
=head1 COPYRIGHT
-Copyright 2003, 2004, 2005 by Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>.
+Copyright 2003, 2004, 2005, 2006 by Audrey Tang E<lt>autrijus at autrijus.orgE<gt>.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/Obfuscate.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/Obfuscate.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/Obfuscate.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -48,7 +48,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -58,7 +58,7 @@
=head1 COPYRIGHT
-Copyright 2003, 2004, 2005 by Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>.
+Copyright 2003, 2004, 2005, 2006 by Audrey Tang E<lt>autrijus at autrijus.orgE<gt>.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/PatchContent.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/PatchContent.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/PatchContent.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -102,7 +102,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -112,7 +112,7 @@
=head1 COPYRIGHT
-Copyright 2003, 2004, 2005 by Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>.
+Copyright 2003, 2004, 2005, 2006 by Audrey Tang E<lt>autrijus at autrijus.orgE<gt>.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/PodStrip.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/PodStrip.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/lib/PAR/Filter/PodStrip.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -59,7 +59,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -69,7 +69,7 @@
=head1 COPYRIGHT
-Copyright 2003, 2004, 2005 by Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>.
+Copyright 2003, 2004, 2005, 2006 by Audrey Tang E<lt>autrijus at autrijus.orgE<gt>.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/lib/PAR/Filter.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/lib/PAR/Filter.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/lib/PAR/Filter.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -85,11 +85,11 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
=head1 COPYRIGHT
-Copyright 2003, 2004, 2005 by Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>.
+Copyright 2003, 2004, 2005, 2006 by Audrey Tang E<lt>autrijus at autrijus.orgE<gt>.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/lib/PAR/Heavy.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/lib/PAR/Heavy.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/lib/PAR/Heavy.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -157,7 +157,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -167,7 +167,7 @@
=head1 COPYRIGHT
-Copyright 2002, 2003, 2004, 2005 by Autrijus Tang
+Copyright 2002, 2003, 2004, 2005, 2006 by Audrey Tang
E<lt>autrijus at autrijus.orgE<gt>.
This program is free software; you can redistribute it and/or modify it
Modified: packages/libpar-perl/branches/upstream/current/lib/PAR/Packer.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/lib/PAR/Packer.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/lib/PAR/Packer.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1470,7 +1470,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -1480,7 +1480,7 @@
=head1 COPYRIGHT
-Copyright 2004, 2005 by Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>.
+Copyright 2004, 2005, 2006 by Audrey Tang E<lt>autrijus at autrijus.orgE<gt>.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/lib/PAR/Tutorial.pod
===================================================================
--- packages/libpar-perl/branches/upstream/current/lib/PAR/Tutorial.pod 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/lib/PAR/Tutorial.pod 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1102,7 +1102,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -1112,7 +1112,7 @@
=head1 COPYRIGHT
-Copyright 2003, 2004, 2005 by Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>.
+Copyright 2003, 2004, 2005, 2006 by Audrey Tang E<lt>autrijus at autrijus.orgE<gt>.
This document is free documentation; you can redistribute it and/or
modify it under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/lib/PAR.pm
===================================================================
--- packages/libpar-perl/branches/upstream/current/lib/PAR.pm 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/lib/PAR.pm 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,5 +1,5 @@
package PAR;
-$PAR::VERSION = '0.90';
+$PAR::VERSION = '0.91';
use 5.006;
use strict;
@@ -12,7 +12,7 @@
=head1 VERSION
-This document describes version 0.90 of PAR, released November 25, 2005.
+This document describes version 0.91 of PAR, released January 28, 2006.
=head1 SYNOPSIS
@@ -151,6 +151,10 @@
=back
+By default, PAR strips POD sections from bundled modules. In case
+that causes trouble, you can turn this off by setting the
+environment variable C<PAR_VERBATIM> to C<1>.
+
=cut
use vars qw(@PAR_INC); # explicitly stated PAR library files
@@ -597,7 +601,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -607,7 +611,7 @@
=head1 COPYRIGHT
-Copyright 2002, 2003, 2004, 2005 by Autrijus Tang
+Copyright 2002, 2003, 2004, 2005, 2006 by Audrey Tang
E<lt>autrijus at autrijus.orgE<gt>.
This program is free software; you can redistribute it and/or modify it
Modified: packages/libpar-perl/branches/upstream/current/myldr/Makefile.PL
===================================================================
--- packages/libpar-perl/branches/upstream/current/myldr/Makefile.PL 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/myldr/Makefile.PL 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# Copyright 2002, 2003, 2004, 2005 by Autrijus Tang.
+# Copyright 2002, 2003, 2004, 2005, 2006 by Audrey Tang.
# Copyright (c) 2002 Mattia Barbon.
# This package is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/myldr/file2c.pl
===================================================================
--- packages/libpar-perl/branches/upstream/current/myldr/file2c.pl 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/myldr/file2c.pl 2006-02-17 08:49:34 UTC (rev 2148)
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
# Copyright (c) 2002 Mattia Barbon.
-# Copyright (c) 2002 Autrijus Tang.
+# Copyright (c) 2002 Audrey Tang.
# This package is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
Modified: packages/libpar-perl/branches/upstream/current/myldr/static.c
===================================================================
--- packages/libpar-perl/branches/upstream/current/myldr/static.c 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/myldr/static.c 2006-02-17 08:49:34 UTC (rev 2148)
@@ -86,6 +86,7 @@
for (i = 0; i < argc; i++) {
buf = (char *)malloc(strlen(argv[i]) + 14);
sprintf(buf, "PAR_ARGV_%i", i);
+ par_unsetenv(buf);
par_setenv(buf, argv[i]);
}
Modified: packages/libpar-perl/branches/upstream/current/script/par.pl
===================================================================
--- packages/libpar-perl/branches/upstream/current/script/par.pl 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/script/par.pl 2006-02-17 08:49:34 UTC (rev 2148)
@@ -649,6 +649,7 @@
require PAR::Heavy;
require PAR::Dist;
require PAR::Filter::PodStrip;
+ eval { require Scalar::Util };
}
# The C version of this code appears in myldr/mktmpdir.c
@@ -848,7 +849,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -858,7 +859,7 @@
=head1 COPYRIGHT
-Copyright 2002, 2003, 2004, 2005 by Autrijus Tang
+Copyright 2002, 2003, 2004, 2005, 2006 by Audrey Tang
E<lt>autrijus at autrijus.orgE<gt>.
Neither this program nor the associated L<parl> program impose any
Property changes on: packages/libpar-perl/branches/upstream/current/script/par.pl
___________________________________________________________________
Name: svn:executable
-
+ *
Modified: packages/libpar-perl/branches/upstream/current/script/parl.pod
===================================================================
--- packages/libpar-perl/branches/upstream/current/script/parl.pod 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/script/parl.pod 2006-02-17 08:49:34 UTC (rev 2148)
@@ -97,7 +97,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -107,7 +107,7 @@
=head1 COPYRIGHT
-Copyright 2002, 2003, 2004, 2005 by Autrijus Tang
+Copyright 2002, 2003, 2004, 2005, 2006 by Audrey Tang
E<lt>autrijus at autrijus.orgE<gt>.
Neither this program nor the associated L<pp> program impose any
Property changes on: packages/libpar-perl/branches/upstream/current/script/parl.pod
___________________________________________________________________
Name: svn:executable
-
+ *
Modified: packages/libpar-perl/branches/upstream/current/script/pp
===================================================================
--- packages/libpar-perl/branches/upstream/current/script/pp 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/script/pp 2006-02-17 08:49:34 UTC (rev 2148)
@@ -37,7 +37,7 @@
sub version {
print << ".";
Perl Packager, version $VERSION (PAR version $PAR::VERSION)
-Copyright 2002, 2003, 2004, 2005 by Autrijus Tang <autrijus\@autrijus.org>
+Copyright 2002, 2003, 2004, 2005, 2006 by Audrey Tang <autrijus\@autrijus.org>
Neither this program nor the associated "parl" program impose any
licensing restrictions on files generated by their execution, in
@@ -419,7 +419,7 @@
=head1 AUTHORS
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>
L<http://par.perl.org/> is the official PAR website. You can write
to the mailing list at E<lt>par at perl.orgE<gt>, or send an empty mail to
@@ -429,7 +429,7 @@
=head1 COPYRIGHT
-Copyright 2002, 2003, 2004, 2005 by Autrijus Tang
+Copyright 2002, 2003, 2004, 2005, 2006 by Audrey Tang
E<lt>autrijus at autrijus.orgE<gt>.
Neither this program nor the associated L<parl> program impose any
Property changes on: packages/libpar-perl/branches/upstream/current/script/pp
___________________________________________________________________
Name: svn:executable
-
+ *
Modified: packages/libpar-perl/branches/upstream/current/script/tkpp
===================================================================
--- packages/libpar-perl/branches/upstream/current/script/tkpp 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/script/tkpp 2006-02-17 08:49:34 UTC (rev 2148)
@@ -875,8 +875,8 @@
=head1 COPYRIGHT
-Copyright 2003, 2004, 2005 by Doug Gruber E<lt>doug(a)dougthug.comE<gt>,
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>.
+Copyright 2003, 2004, 2005, 2006 by Doug Gruber E<lt>doug(a)dougthug.comE<gt>,
+Audrey Tang E<lt>autrijus at autrijus.orgE<gt>.
Neither this program nor the associated L<pp> program impose any
licensing restrictions on files generated by their execution, in
Property changes on: packages/libpar-perl/branches/upstream/current/script/tkpp
___________________________________________________________________
Name: svn:executable
-
+ *
Modified: packages/libpar-perl/branches/upstream/current/t/2-pp.t
===================================================================
--- packages/libpar-perl/branches/upstream/current/t/2-pp.t 2006-02-16 14:55:39 UTC (rev 2147)
+++ packages/libpar-perl/branches/upstream/current/t/2-pp.t 2006-02-17 08:49:34 UTC (rev 2148)
@@ -50,7 +50,8 @@
exit;
}
-if (defined &Win32::GetShortPathName) {
+# NOTE: Win32::GetShortPathName exists on cygwin, too
+if ($^O eq 'MSWin32' && defined &Win32::GetShortPathName) {
$^X = lc(Win32::GetShortPathName($^X));
$startperl = lc(Win32::GetShortPathName($startperl));
}
More information about the Pkg-perl-cvs-commits
mailing list