App-ghmulti
view release on metacpan or search on metacpan
lib/App/ghmulti.pm view on Meta::CPAN
my ($cmd, $echo) = @_;
$echo //= 1;
chomp($cmd);
print("Running: $cmd\n") if $echo;
system($cmd) == 0 or croak("Failed running $cmd");
}
sub usr_error {
pod2usage(-verbose => 1, -message => "$0: $_[0]\n", -output => \*STDERR, -exitval => 1);
}
# ----------- functions for Getopt::Std, must be in main namespace ---------------------
#
# Print help text, see docu of Getopt::Std.
#
#sub HELP_MESSAGE {
sub main::HELP_MESSAGE {
pod2usage(-exitval => 0, -verbose => 2);
}
#
# Print version info, see docu of Getopt::Std.
#
sub main::VERSION_MESSAGE {
print("$0: $VERSION\n");
}
1;
__END__
=pod
=head1 NAME
App::ghmulti - Helps when using multiple Github accounts with SSH keys
=head1 VERSION
Version 0.07
=head1 SYNOPSIS
use App::ghmulti;
App::ghmulti->run();
or
{
local @ARGV = @my_args;
App::ghmulti->run();
}
=head1 DESCRIPTION
Please read the documentation in the L<ghmulti> program for more information.
B<Note>: this module uses the B<git> command line tool, so B<git> must be
installed and available via C<PATH>.
=head1 BUGS
Please report any bugs or feature requests to C<bug-app-ghmulti at
rt.cpan.org>, or through the web interface at
L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-ghmulti> or create a
L<GitHub Issue|https://github.com/klaus-rindfrey/perl-app-ghmulti/issues> . I
will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
=head1 SEE ALSO
L<ghmulti>,
L<Git::RemoteURL::Parse>,
L<GitHub::Config::SSH::UserData>
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc App::ghmulti
You can also look for information at:
=over 4
=item * RT: CPAN's request tracker (report bugs here)
L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=App-ghmulti>
=item * Search CPAN
L<https://metacpan.org/release/App-ghmulti>
=item * GitHub Repository
L<https://github.com/klaus-rindfrey/perl-app-ghmulti>
=back
=head1 ACKNOWLEDGEMENTS
Many thanks to Oanh Nguyen (oanhnn) for publishing this gist:
L<https://gist.github.com/oanhnn/80a89405ab9023894df7>, and to everyone who
contributed in the comments.
( run in 2.138 seconds using v1.01-cache-2.11-cpan-99c4e6809bf )