Skip to content

Instantly share code, notes, and snippets.

@bingos
Created May 21, 2009 15:32
Show Gist options
  • Save bingos/115527 to your computer and use it in GitHub Desktop.
Save bingos/115527 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Pod::Stripper;
use File::Copy qw(cp);
use File::Find;
my $dir = shift || die;
die unless -d $dir;
find( \&_wanted, $dir, );
exit 0;
sub _wanted {
my $file = $_;
return if -d $file;
print $File::Find::name, "\n";
my $p = Pod::Stripper->new();
my $tmp = $file . '.tmp';
cp( $file, $tmp ) or die "$!\n";
chmod 0644, $file or die"$!\n";
$p->parse_from_file( $tmp, $file );
unlink $tmp;
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment