App-PDFLibrarian

 view release on metacpan or  search on metacpan

lib/App/PDFLibrarian/Library.pm  view on Meta::CPAN


}

sub cleanup_links {

  # remove broken links and empty directories
  my $wanted = sub {
    if (-d $_) {
      rmdir $_;
    }
    if (-l $_ && !stat($_)) {
      unlink($_) or croak "$Script: could not unlink '$_': $!";
    }
  };
  find({wanted => \&$wanted, bydepth => 1, no_chdir => 1}, $pdflibrarydir);
  printf STDERR "$Script: cleaned up PDF file links in '$pdflibrarydir'\n";

}



( run in 1.441 second using v1.01-cache-2.11-cpan-4ac696b4eb4 )