Subject: | Archive Tar to support direct Archive::Tar::File adds |
Hi, with this minor patch below, one could create tar files completeley
in memory:
diff --git a/Tar.pm b/Tar.pm
index 839e113..2cd8cac 100644
--- a/Tar.pm
+++ b/Tar.pm
@@ -1308,6 +1308,10 @@ sub add_files {
my @rv;
for my $file ( @files ) {
+ if(ref($file) eq 'Archive::Tar::File') {
+ push @rv, $file; # Archive::Tar::File Object was passed
directly.
+ next;
+ }
unless( -e $file || -l $file ) {
$self->_error( qq[No such file: '$file'] );
next;