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

Moin,

file along the path to less memory with me in part V of the no Carp 
series. Needless to say, all tests pass.

All tests successful.
u=2.73  s=0.81  cu=183.97  cs=25.69  scripts=954  tests=107891

Notes: I intended to go along alphabetically, but File::Path is used by so 
many modules, like Archive::Tar and AutoSplit, that my efforts to show a 
memory difference were a bit hindered by it :)

Best wishes,

Tels


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

 "When it's done in 2001." - 2000 Christmas card about Duke Nukem Forever
 (http://tinyurl.com/6m8nh)

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

iQEVAwUBQr6MhncLPEOTuEwVAQEjhQf/VQZt6Y+cxu5Qoi3s5hsejMNtXjV2nkTc
W1tBEFw/3xU/QYkRlDkcV0ceJTEKnbu02rACfXhcTAcZ9T7cAplllPMV1ERKI7yV
OZg0GWYELqg5BNbUFj0cZlg3SkflXr3dJ81TfJQJaBcTY6OYJoxvc/xk7kP3t4TE
MQIaHgZ6wSjRmUtCG9vt8j3n86Jtl8WPqjK7qTyf1J/EGuRVV3M+1c4uXR+/8dwV
L+Hak1v4AZhE4V4FDb7NMnegpz4RHATkYnI4fL3LO516VusuLrk22ehJn7BKhZ1h
ckmpX6S07zFenOVpfNNNOXFe0/4iObk5ckfId2RcgXfe008dTP+lcA==
=1gQ+
-----END PGP SIGNATURE-----
diff -ruN blead.patch.4/lib/File/Path.pm blead.patch.5/lib/File/Path.pm
--- blead.patch.4/lib/File/Path.pm      2005-05-05 17:46:10.000000000 +0200
+++ blead.patch.5/lib/File/Path.pm      2005-06-26 12:50:11.000000000 +0200
@@ -119,13 +119,12 @@
 =cut
 
 use 5.006;
-use Carp;
 use File::Basename ();
 use Exporter ();
 use strict;
 use warnings;
 
-our $VERSION = "1.07";
+our $VERSION = "1.07_01";
 our @ISA = qw( Exporter );
 our @EXPORT = qw( mkpath rmtree );
 
@@ -137,6 +136,16 @@
 my $force_writeable = ($^O eq 'os2' || $^O eq 'dos' || $^O eq 'MSWin32' ||
                       $^O eq 'amigaos' || $^O eq 'MacOS' || $^O eq 'epoc');
 
+sub carp {
+    require Carp;
+    goto &Carp::carp;
+}
+
+sub croak {
+    require Carp;
+    goto &Carp::croak;
+}
+
 sub mkpath {
     my($paths, $verbose, $mode) = @_;
     # $paths   -- either a path string or ref to list of paths
@@ -165,7 +174,7 @@
        unless (mkdir($path,$mode)) {
            my $e = $!;
            # allow for another process to have created it meanwhile
-           croak "mkdir $path: $e" unless -d $path;
+           croak ("mkdir $path: $e") unless -d $path;
        }
        push(@created, $path);
     }
@@ -183,7 +192,7 @@
       $roots = [$roots] unless ref $roots;
     }
     else {
-      carp "No root path(s) specified\n";
+      carp ("No root path(s) specified\n");
       return 0;
     }
 
@@ -203,7 +212,7 @@
            # to recurse in which case we are better than rm -rf for 
            # subtrees with strange permissions
            chmod($rp | 0700, ($Is_VMS ? VMS::Filespec::fileify($root) : $root))
-             or carp "Can't make directory $root read+writeable: $!"
+             or carp ("Can't make directory $root read+writeable: $!")
                unless $safe;
 
            if (opendir my $d, $root) {
@@ -217,7 +226,7 @@
                closedir $d;
            }
            else {
-               carp "Can't read $root: $!";
+               carp ("Can't read $root: $!");
                @files = ();
            }
 
@@ -237,14 +246,14 @@
                next;
            }
            chmod $rp | 0700, $root
-             or carp "Can't make directory $root writeable: $!"
+             or carp ("Can't make directory $root writeable: $!")
                if $force_writeable;
            print "rmdir $root\n" if $verbose;
            if (rmdir $root) {
                ++$count;
            }
            else {
-               carp "Can't remove directory $root: $!";
+               carp ("Can't remove directory $root: $!");
                chmod($rp, ($Is_VMS ? VMS::Filespec::fileify($root) : $root))
                    or carp("and can't restore permissions to "
                            . sprintf("0%o",$rp) . "\n");
@@ -259,13 +268,13 @@
                next;
            }
            chmod $rp | 0600, $root
-             or carp "Can't make file $root writeable: $!"
+             or carp ("Can't make file $root writeable: $!")
                if $force_writeable;
            print "unlink $root\n" if $verbose;
            # delete all versions under VMS
            for (;;) {
                unless (unlink $root) {
-                   carp "Can't unlink file $root: $!";
+                   carp ("Can't unlink file $root: $!");
                    if ($force_writeable) {
                        chmod $rp, $root
                            or carp("and can't restore permissions to "

Reply via email to