$DEBUG = 0;
$WARN = 1;
$FOLLOW_SYMLINK = 0;
-$VERSION = "1.31";
+$VERSION = "1.32";
$CHOWN = 1;
$CHMOD = 1;
$DO_NOT_USE_PREFIX = 0;
# Pointless assignment to make -w shut up
my $getpwuid; $getpwuid = 'unknown' unless eval { my $f = getpwuid (0); };
my $getgrgid; $getgrgid = 'unknown' unless eval { my $f = getgrgid (0); };
-use constant UNAME => sub { $getpwuid || scalar getpwuid( shift() ) };
-use constant GNAME => sub { $getgrgid || scalar getgrgid( shift() ) };
+use constant UNAME => sub { $getpwuid || scalar getpwuid( shift() ) || '' };
+use constant GNAME => sub { $getgrgid || scalar getgrgid( shift() ) || '' };
use constant UID => $>;
use constant GID => (split ' ', $) )[0];
my $type = __PACKAGE__->_filetype($path);
my $data = '';
- unless ($type == DIR || $type == SYMLINK) {
- my $fh = IO::File->new;
- $fh->open($path) or return;
-
- ### binmode needed to read files properly on win32 ###
- binmode $fh;
- $data = do { local $/; <$fh> };
- close $fh;
+ READ: {
+ unless ($type == DIR ) {
+ my $fh = IO::File->new;
+
+ unless( $fh->open($path) ) {
+ ### dangling symlinks are fine, stop reading but continue
+ ### creating the object
+ last READ if $type == SYMLINK;
+
+ ### otherwise, return from this function --
+ ### anything that's *not* a symlink should be
+ ### resolvable
+ return;
+ }
+
+ ### binmode needed to read files properly on win32 ###
+ binmode $fh;
+ $data = do { local $/; <$fh> };
+ close $fh;
+ }
}
my @items = qw[mode uid gid size mtime];
uupacktool.pl -p lib/Archive/Tar/t/src/long/bar.tar lib/Archive/Tar/t/src/long/bar.tar.packed
-Created at Fri May 18 13:05:16 2007
+Created at Thu May 24 15:38:19 2007
#########################################################################
__UU__
M8P``````````````````````````````````````````````````````````
uupacktool.pl -p lib/Archive/Tar/t/src/long/foo.tgz lib/Archive/Tar/t/src/long/foo.tgz.packed
-Created at Fri May 18 13:05:16 2007
+Created at Thu May 24 15:38:19 2007
#########################################################################
__UU__
M'XL(`````````^W72VZ#,!`&8*]S"BY`F,$/MCT`ET")25`<D"A1Q.UKR*M1
uupacktool.pl -p lib/Archive/Tar/t/src/short/bar.tar lib/Archive/Tar/t/src/short/bar.tar.packed
-Created at Fri May 18 13:05:16 2007
+Created at Thu May 24 15:38:19 2007
#########################################################################
__UU__
M8P``````````````````````````````````````````````````````````
uupacktool.pl -p lib/Archive/Tar/t/src/short/foo.tgz lib/Archive/Tar/t/src/short/foo.tgz.packed
-Created at Fri May 18 13:05:16 2007
+Created at Thu May 24 15:38:19 2007
#########################################################################
__UU__
M'XL(`````````^W300K",!"%X5GW%#G"3-JFYREJ080NJKU_A^A"$.RJ(\+_