#!/usr/bin/perl
# $File: //member/autrijus/Module-Signature/bin/cpansign $ $Author: autrijus $
# $Revision: #3 $ $Change: 628 $ $DateTime: 2002/08/14 02:14:38 $

$VERSION = '0.02';

=head1 NAME

cpansign - CPAN signature management utility

=head1 SYNOPSIS

    % cpansign		# create a signature
    % cpansign sign	# ditto, but overwrites without asking
    % cpansign -s	# same thing
    % cpansign verify	# verify a signature
    % cpansign -v	# same thing

=head1 DESCRIPTION

This utility let you create and verify SIGNATURE files. 

=cut

use strict;
use Module::Signature;

my $cmd = {
    s => "sign",
    v => "verify",
    h => "help",
};

my $op = shift; $op =~ s/^--?//;
$op = $cmd->{substr($op, 0, 1)};
push @ARGV, '1' if $op eq 'sign';

(system("perldoc $0"), exit) if $op eq 'help';

if (my $sub = Module::Signature->can($op ||= 'sign')) {
    $sub->(@ARGV);
}
else {
    die "No such operation: $op\n";
}


exit;

=head1 SEE ALSO

L<Module::Signature>

=head1 AUTHORS

Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>

=head1 COPYRIGHT

Copyright 2002 by Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>.

This program is free software; you can redistribute it and/or 
modify it under the same terms as Perl itself.

See L<http://www.perl.com/perl/misc/Artistic.html>

=cut
