Make perl.{req,prov} warn about unreadable files.
This commit is contained in:
parent
a1517d9c09
commit
0ffc1e9143
|
@ -82,7 +82,10 @@ sub process_file {
|
|||
my ($file) = @_;
|
||||
chomp $file;
|
||||
|
||||
open(FILE, "<$file") || return;
|
||||
if (!open(FILE, $file)) {
|
||||
warn("$0: Warning: Could not open file '$file' for reading: $!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
my ($package, $version, $incomment, $inover) = ();
|
||||
|
||||
|
|
|
@ -79,7 +79,10 @@ sub process_file {
|
|||
my ($file) = @_;
|
||||
chomp $file;
|
||||
|
||||
open(FILE, "<$file") || return;
|
||||
if (!open(FILE, $file)) {
|
||||
warn("$0: Warning: Could not open file '$file' for reading: $!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
while (<FILE>) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue