In Archive::Builder::Archive::_tar(), due to the way
Archive::Tar::write() is called (no arguments, meaning return the result
as a string) a doubling of the amount of memory in use occurs. When
working with input data which results in a large output file (large
number and/or size of files), this can result in an out-of-memory
condition, especially with 32-bit Perls.
I would like to suggest adding a call to Archive::Tar's clear() method,
which will allow the Archive::Tar object's data to be garbage collected,
as such:
# at end of Archive::Builder::Archive, _tar() method:
# Get the output
my $string = $Archive->write;
# free up some memory
$Archive->clear;
$string ? \$string : undef;
}