ADAMK-Release
view release on metacpan or search on metacpan
lib/ADAMK/Release.pm view on Meta::CPAN
my $rv = ! system( "$env $cmd" );
if ( $rv or ! @_ ) {
return $rv;
}
$self->error($message);
}
sub env {
my $self = shift;
my %env = @_;
join ' ', map { "$_=$env{$_}" } sort keys %env;
}
sub error {
my $self = shift;
my $message = sprintf(shift, @_);
Carp::croak($message);
}
sub prompt {
my $self = shift;
return IO::Prompt::Tiny::prompt(@_);
}
sub password {
my $self = shift;
my $password = undef;
if ( defined $_[0] ) {
print "$_[0] ";
}
eval {
Term::ReadKey::ReadMode('noecho');
$password = <STDIN>;
};
Term::ReadKey::ReadMode(0);
return undef if not defined $password;
chomp($password);
return $password;
}
1;
__END__
=head1 NAME
ADAMK::Release -
=head1 DESCRIPTION
C<ADAMK::Release> is the backend behind the C<adamk-release> script that
is used to build distribution tarballs for modules with the minimalist
repository style.
=head1 AUTHORS
Adam Kennedy E<lt>adamk@cpan.orgE<gt>
=head1 SEE ALSO
L<http://ali.as/>
=head1 COPYRIGHT
Copyright 2013 Adam Kennedy.
This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the
LICENSE file included with this module.
( run in 0.486 second using v1.01-cache-2.11-cpan-e1769b4cff6 )