aboutsummaryrefslogtreecommitdiffstats
path: root/Perl
diff options
context:
space:
mode:
authorDenis Barbier <barbier>2001-11-27 00:59:56 +0000
committerDenis Barbier <barbier>2001-11-27 00:59:56 +0000
commit8b3186870776861b0d25c0cdf77ae586e1d09af6 (patch)
treeac0417dcc44d35a3fbe46cd4e0ee87d8196fce28 /Perl
parentfbafe7ce3c5e4d6b1eb13f72190eb8d931755f9c (diff)
Constructor returns undef when source files are not found.
CVS version numbers Perl/Local/Inside/DebSrc.pm: 1.1 -> 1.2
Diffstat (limited to 'Perl')
-rw-r--r--Perl/Local/Inside/DebSrc.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/Perl/Local/Inside/DebSrc.pm b/Perl/Local/Inside/DebSrc.pm
index 4cda333ffb4..99b378082fb 100644
--- a/Perl/Local/Inside/DebSrc.pm
+++ b/Perl/Local/Inside/DebSrc.pm
@@ -65,6 +65,9 @@ is almost equivalent to
$deb->bind_patch( parse_dft => -1 );
$deb->parse();
+When tarball or patch file is required but does not exist, the C<new>
+method returns C<undef> after printing a warning.
+
=cut
sub new {
@@ -86,8 +89,16 @@ sub new {
last unless s/^ \S* \S* //;
if (m/\.tar\.gz$/) {
$origtargz = $dir . '/' . $_;
+ unless (-f $origtargz) {
+ warn "$origtargz: No such file\n";
+ return undef;
+ }
} elsif (m/\.diff\.gz$/) {
$diffgz = $dir . '/' . $_;
+ unless (-f $diffgz) {
+ warn "$diffgz No such file\n";
+ return undef;
+ }
}
}
close(DSC);

© 2014-2024 Faster IT GmbH | imprint | privacy policy