aboutsummaryrefslogtreecommitdiffstats
path: root/packdrake.pm
diff options
context:
space:
mode:
Diffstat (limited to 'packdrake.pm')
-rw-r--r--packdrake.pm14
1 files changed, 10 insertions, 4 deletions
diff --git a/packdrake.pm b/packdrake.pm
index b8a77d7..c62b805 100644
--- a/packdrake.pm
+++ b/packdrake.pm
@@ -29,8 +29,8 @@ sub new {
my $pack = Packdrakeng->open(
%options,
archive => $file
- ) or return undef;
-
+ ) or do { print STDERR "Can't open $file: $!\n"; return undef };
+ #- rebless
bless($pack, $class);
}
@@ -48,7 +48,10 @@ sub extract_all_archive {
sub list_archive {
foreach my $archive (@_) {
- my $pack = Packdrakeng->open(archive => $archive) or next;
+ my $pack = Packdrakeng->open(archive => $archive) or do {
+ print STDERR "Can't open $archive: $!\n";
+ next;
+ };
$pack->list();
}
}
@@ -73,7 +76,10 @@ sub build_archive {
sub cat_archive {
foreach my $archive (@_) {
- my $pack = Packdrakeng->open(archive => $archive) or next;
+ my $pack = Packdrakeng->open(archive => $archive) or do {
+ print STDERR "Can't open $archive: $!\n";
+ next;
+ };
(undef, my $files, undef) = $pack->getcontent();
foreach (@$files) {
$pack->extract_virtual(\*STDOUT, $_);