-----BEGIN PGP SIGNED MESSAGE-----

Moin,

in my quest to rescue^Wpreserve memory, here is the second patch in my 
noCarp series. The first one can be found here:

        http://www.nntp.perl.org/group/perl.datetime/5816

This one makes loading Carp conditional in Archive::Tar. All tests pass 
before/after, but I fear that error handling is not tested in 
Archive::Tar's testsuite. If somebody has any idea how to add a test for 
this, feel free to start :)

        All tests successful.
        u=2.66  s=0.73  cu=178.57  cs=24.03  scripts=954  tests=107891

Best wishes,

Tels

- -- 
 Signed on Sun Jun 26 10:43:49 2005 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Yeah. Whatever."

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQEVAwUBQr5uuHcLPEOTuEwVAQGgigf9H/FpntuRHK6PsOOAwu2RpqnW/2uUzv1F
FabJmMGVT0zLPFEtWzzyOwTgMnJlu6hLViDhiwlQtGJxk8mDjFJdx8rspgQP98CJ
1CGDG1Iv5yV7CvXnqz8gCTfEg0jOmpFFcTmfBSyFIL0wk349NELJqW4qS2+Cg+e0
j6ZsjsJSaXEE4vtFHxkDIy79FNkaQRKbdqcQqS9sRCgxboYY/EFkmcCzizhID7sH
0FcYWq1c1JDNL4juKd8Fe3IBTV76gIWiitJj1V11T5mPjKMEutWGRlNVkExbzAAo
91o92TN7VC9GhJUcAtLrQCVmNAl2qZeFkkcjcvtibNtsPVd1N2tI0g==
=tNad
-----END PGP SIGNATURE-----
diff -ruN blead/lib/Archive/Tar.pm blead.patch/lib/Archive/Tar.pm
--- blead/lib/Archive/Tar.pm    2005-06-22 12:06:39.000000000 +0200
+++ blead.patch/lib/Archive/Tar.pm      2005-06-26 10:39:27.000000000 +0200
@@ -14,7 +14,7 @@
 $DEBUG              = 0;
 $WARN               = 1;
 $FOLLOW_SYMLINK     = 0;
-$VERSION            = "1.24_01";
+$VERSION            = "1.24_02";
 $CHOWN              = 1;
 $CHMOD              = 1;
 $DO_NOT_USE_PREFIX  = 0;
@@ -35,7 +35,6 @@
 
 use Cwd;
 use IO::File;
-use Carp                qw(carp croak);
 use File::Spec          ();
 use File::Spec::Unix    ();
 use File::Path          ();
@@ -1128,7 +1127,8 @@
         ### set Archive::Tar::WARN to 0 to disable printing
         ### of errors
         if( $WARN ) {
-            carp $DEBUG ? $longmess : $msg;
+            require Carp;
+            Carp::carp( $DEBUG ? $longmess : $msg);
         }
 
         return;
@@ -1290,7 +1290,8 @@
 sub can_handle_compressed_files { return ZLIB ? 1 : 0 }
 
 sub no_string_support {
-    croak("You have to install IO::String to support writing archives to 
strings");
+    require Carp;
+    Carp::croak("You have to install IO::String to support writing archives to 
strings");
 }
 
 1;

Reply via email to