Make perl.{req,prov} warn about unreadable files.

This commit is contained in:
Ville Skyttä 2010-02-25 19:37:55 +02:00 committed by Panu Matilainen
parent a1517d9c09
commit 0ffc1e9143
2 changed files with 8 additions and 2 deletions

View File

@ -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) = ();

View File

@ -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>) {