Algorithm-LCSS

 view release on metacpan or  search on metacpan

misc/make_manifest.pl  view on Meta::CPAN

#!/usr/bin/perl -w

# make_manifest.pl - get ready to tarball a module for CPAN
# this script expects to be in the /misc dir. It makes really clean, writes
# a /html dir from the .pm pod, writes an accurate manifest and then fixes
# up all the line endings.

use strict;
use Pod::Html;

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_manifest.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 1.318 second using v1.01-cache-2.11-cpan-49f99fa48dc )