CPANPLUS-Shell-Wx
view release on metacpan or search on metacpan
misc/make_dist.pl view on Meta::CPAN
# up all the line endings.
#added by Skaman Sam:
# - .tar.gz creation
use strict;
use Pod::Html;
use Cwd;
use File::Spec;
my $backup = 0;
my $root = shift @ARGV || '../';
$root =~ tr|\\|/|;
$root = "$root/" unless $root =~ m|/$|;
make_clean($root);
my $htmldir = $root."html/";
mkdir $htmldir, 0777; # make the html dir
unlink <$htmldir*>; # make sure it is empty
my ( $dirs, $files ) = recurse_tree($root);
misc/make_dist.pl view on Meta::CPAN
return \@dirs, \@files;
}
# clean windows line ending away
sub fix_line_endings {
my $file = shift;
local $/;
open my $fh, "+<$file" or die "Can't open $file for R/W $!\n";
binmode $fh;
my $data = <$fh>;
write_file( "$file.bak" , $data ) if $backup;
$data =~ s/\015\012/\012/g;
$data =~ s/ +\012/\012/g;
$data =~ s/\t/ /g;
seek $fh, 0, 0;
truncate $fh, 0;
print $fh $data;
close $fh;
$file =~ s/\Q$root\E//o;
print "Processed $file\n";
}
( run in 0.735 second using v1.01-cache-2.11-cpan-49f99fa48dc )