App-BPOMUtils-RPO-Checker

 view release on metacpan or  search on metacpan

lib/App/BPOMUtils/RPO/Checker.pm  view on Meta::CPAN

        log_info "[%d/%d] Processing file %s ...", $i, scalar(@{ $args{filenames} }), $filename
            unless $args{_no_log};
        my ($basename, $dirname, undef) = File::Basename::fileparse($filename);
        unless (-f $filename) {
            push @errors, {file=>$filename, message=>"File not found or not a regular file"};
            next;
        }

      CHECK_FILENAME: {
            if ($basename =~ /\.[^.]+\./) {
                push @errors, {file=>$filename, message=>"Filename contains multiple dots, currently uploadable but not viewable in ereg-rba"};
            }
            if ($basename =~ /[^A-Za-z0-9 _.-]/) {
                push @warnings, {file=>$filename, message=>"Filename contains symbols, should be avoided to ensure viewable in ereg-rba"};
            }
        }

      CHECK_READABILITY: {
            if (!-r($filename)) {
                push @errors, {file=>$filename, message=>"File cannot be read"};
                next FILE;



( run in 2.165 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )