File: delete_old_pods.pl

package info (click to toggle)
libhtml-mason-perl 1%3A1.26-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,636 kB
  • ctags: 1,260
  • sloc: perl: 13,880; sh: 154; makefile: 47
file content (15 lines) | stat: -rwxr-xr-x 376 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl -w

use strict;
use File::Spec;

foreach my $dir (@INC) {
    foreach my $pm ( qw( Interp ApacheHandler Request Component ) ) {
	my $pod_file = File::Spec->catfile( $dir, 'HTML', 'Mason', "$pm.pod" );
	
	if ( -e $pod_file ) {
	    warn "Removing obsolete documentation file $pod_file\n";
	    unlink $pod_file or warn "Cannot unlink $pod_file: $!";
	}
    }
}