#!/usr/bin/perl -w
# update manifest
use strict;
use File::Basename;
use FindBin qw( $Bin $Script );

$| ++;

my $module = basename( $Bin );
my $list = join "\n",
my ( $HIST, $MAKE, $LIST ) = qw( Changes Makefile.PL MANIFEST );

die $! unless chdir $Bin && open my $handle, '>', $LIST; ## create manifest

$list = << "EOF";
README
$list
$Script
EOF

print $handle $list, `find lib t tools -type f`;
close $handle;

system( "vi $HIST && cat $LIST" ); ## update changes
warn << "EOF";

Be sure that the following are up to date.

    VERSION and MODULES in $module.pm and PREREQ_PM in $MAKE

EOF
exit 0;    
