If there are input files on the command line that don't exist, prior to
this commit, the message was output that they are transitory. This adds
a check and a correct message.
my $has_input_files = @files;
-if ($has_input_files
- && ($regen || $show_counts || $do_upstream_cpan || $do_deltas))
-{
- croak "--regen, --counts, --deltas, and --cpan can't be used since using specific files";
+if ($has_input_files) {
+ if ($regen || $show_counts || $do_upstream_cpan || $do_deltas) {
+ croak "--regen, --counts, --deltas, and --cpan can't be used since using specific files";
+ }
+ foreach my $file (@files) {
+ croak "Can't read file '$file'" if ! -r $file;
+ }
}
if ($add_link && ! $has_input_files) {