aboutsummaryrefslogtreecommitdiffstats
path: root/packdrake.pm
diff options
context:
space:
mode:
Diffstat (limited to 'packdrake.pm')
-rw-r--r--packdrake.pm15
1 files changed, 11 insertions, 4 deletions
diff --git a/packdrake.pm b/packdrake.pm
index f6f63e1..b8a77d7 100644
--- a/packdrake.pm
+++ b/packdrake.pm
@@ -36,13 +36,16 @@ sub new {
sub extract_archive {
my ($pack, $dir, @files) = @_;
- if (! scalar(@files)) {
- my ($d, $f, $l) = $pack->getcontent();
- push(@files, @$d, @$f, @$l);
- }
+ @files or return;
$pack->extract($dir, @files);
}
+sub extract_all_archive {
+ my ($pack, $dir) = @_;
+ my ($d, $f, $l) = $pack->getcontent();
+ $pack->extract($dir, @$d, @$f, @$l);
+}
+
sub list_archive {
foreach my $archive (@_) {
my $pack = Packdrakeng->open(archive => $archive) or next;
@@ -123,6 +126,10 @@ Return undef on failure.
Extract files list into the specified directory.
+=item B<< packdrake->extract_all_archive($dir) >>
+
+Extract all files into the specified directory.
+
=item B<packdrake::list_archive(@list)>
List files packed into achives given.