Plack-App-MCCS
view release on metacpan or search on metacpan
local/bin/cpan-upload view on Meta::CPAN
#pod
#pod =head1 CONFIGURATION
#pod
#pod If you have a C<.pause> file in your home directory, it will be checked for a
#pod username and password. It should look like this:
#pod
#pod user EXAMPLE
#pod password your-secret-password
#pod
#pod You can GnuPG-encrypt this file if you wish, but you must install
#pod L<Config::Identity> and configure your gpg-agent as L<Config::Identity>
#pod currently doesn't prompt for a password at decryption time:
#pod
#pod # Follow the prompts, setting your key as the "recipient"
#pod # Use ^D once you've finished typing out your authentication information
#pod gpg -ea > $HOME/.pause
#pod # OR, encrypt a file you already created:
#pod gpg -ea $HOME/.pause && mv $HOME/.pause{.asc,}
#pod
#pod =head1 SEE ALSO
#pod
#pod =over 4
#pod
#pod =item L<CPAN::Uploader>
#pod
#pod =item L<Config::Identity>
#pod
#pod =back
local/bin/cpan-upload view on Meta::CPAN
=head1 CONFIGURATION
If you have a C<.pause> file in your home directory, it will be checked for a
username and password. It should look like this:
user EXAMPLE
password your-secret-password
You can GnuPG-encrypt this file if you wish, but you must install
L<Config::Identity> and configure your gpg-agent as L<Config::Identity>
currently doesn't prompt for a password at decryption time:
# Follow the prompts, setting your key as the "recipient"
# Use ^D once you've finished typing out your authentication information
gpg -ea > $HOME/.pause
# OR, encrypt a file you already created:
gpg -ea $HOME/.pause && mv $HOME/.pause{.asc,}
=head1 SEE ALSO
=over 4
=item L<CPAN::Uploader>
=item L<Config::Identity>
=back
local/lib/perl5/Dist/Zilla/Plugin/Git/Tag.pm view on Meta::CPAN
The L<formatting codes|Dist::Zilla::Role::Git::StringFormatter/DESCRIPTION>
used in C<tag_format> and C<tag_message> are documented under
L<Dist::Zilla::Role::Git::StringFormatter>.
=item * time_zone - the time zone to use with C<%d>. Can be any
time zone name accepted by DateTime. Defaults to C<local>.
=item * branch - which branch to tag. Defaults to the current branch.
=item * signed - whether to make a GPG-signed tag, using the default
e-mail address's key. Consider setting C<user.signingkey> if C<gpg>
can't find the correct key:
$ git config user.signingkey 450F89EC
=back
=head1 METHODS
=head2 tag
local/lib/perl5/Module/Signature.pm view on Meta::CPAN
my $sock = IO::Socket::INET->new(
Timeout => $Timeout,
PeerAddr => "$KeyServer:$KeyServerPort",
);
$CanKeyRetrieve = ($sock ? 1 : 0);
$sock->shutdown(2) if $sock;
}
$AutoKeyRetrieve = $CanKeyRetrieve;
}
if (my $version = _has_gpg()) {
return _verify_gpg($sigtext, $plaintext, $version);
}
elsif (eval {require Crypt::OpenPGP; 1}) {
return _verify_crypt_openpgp($sigtext, $plaintext);
}
else {
warn "Cannot use GnuPG or Crypt::OpenPGP, please install either one first!\n";
return _compare($sigtext, $plaintext, CANNOT_VERIFY);
}
}
sub _has_gpg {
my $gpg = _which_gpg() or return;
`$gpg --version` =~ /GnuPG.*?(\S+)\s*$/m or return;
return $1;
}
sub _fullcheck {
my $skip = shift;
my @extra;
local $^W;
local $ExtUtils::Manifest::Quiet = 1;
local/lib/perl5/Module/Signature.pm view on Meta::CPAN
sub _default_skip {
local $_ = shift;
return 1 if /\bRCS\b/ or /\bCVS\b/ or /\B\.svn\b/ or /,v$/
or /^MANIFEST\.bak/ or /^Makefile$/ or /^blib\//
or /^MakeMaker-\d/ or /^pm_to_blib/ or /^blibdirs/
or /^_build\// or /^Build$/ or /^pmfiles\.dat/
or /^MYMETA\./
or /~$/ or /\.old$/ or /\#$/ or /^\.#/;
}
my $which_gpg;
sub _which_gpg {
# Cache it so we don't need to keep checking.
return $which_gpg if $which_gpg;
for my $gpg_bin ('gpg', 'gpg2', 'gnupg', 'gnupg2') {
my $version = `$gpg_bin --version 2>&1`;
if( $version && $version =~ /GnuPG/ ) {
$which_gpg = $gpg_bin;
return $which_gpg;
}
}
}
sub _verify_gpg {
my ($sigtext, $plaintext, $version) = @_;
local $SIGNATURE = Win32::GetShortPathName($SIGNATURE)
if defined &Win32::GetShortPathName and $SIGNATURE =~ /[^-\w.:~\\\/]/;
my $keyserver = _keyserver($version);
require File::Temp;
my $fh = File::Temp->new();
print $fh $sigtext || _read_sigfile($SIGNATURE);
close $fh;
my $gpg = _which_gpg();
my @quiet = $Verbose ? () : qw(-q --logger-fd=1);
my @cmd = (
$gpg, qw(--verify --batch --no-tty), @quiet, ($KeyServer ? (
"--keyserver=$keyserver",
($AutoKeyRetrieve and $version ge '1.0.7')
? '--keyserver-options=auto-key-retrieve'
: ()
) : ()), $fh->filename
);
my $output = '';
if( $Verbose ) {
warn "Executing @cmd\n";
local/lib/perl5/Module/Signature.pm view on Meta::CPAN
warn "==> MISMATCHED content between MANIFEST and the distribution! <==\n";
warn "==> Please correct your MANIFEST file and/or delete extra files. <==\n";
}
if (!$overwrite and -e $SIGNATURE and -t STDIN) {
local $/ = "\n";
print "$SIGNATURE already exists; overwrite [y/N]? ";
return unless <STDIN> =~ /[Yy]/;
}
if (my $version = _has_gpg()) {
_sign_gpg($SIGNATURE, $plaintext, $version);
}
elsif (eval {require Crypt::OpenPGP; 1}) {
_sign_crypt_openpgp($SIGNATURE, $plaintext);
}
else {
die 'Cannot use GnuPG or Crypt::OpenPGP, please install either one first!';
}
warn "==> SIGNATURE file created successfully. <==\n";
return SIGNATURE_OK;
}
sub _sign_gpg {
my ($sigfile, $plaintext, $version) = @_;
die "Could not write to $sigfile"
if -e $sigfile and (-d $sigfile or not -w $sigfile);
my $gpg = _which_gpg();
local *D;
my $set_key = '';
$set_key = qq{--default-key "$AUTHOR"} if($AUTHOR);
open D, "| $gpg $set_key --clearsign --openpgp --personal-digest-preferences RIPEMD160 >> $sigfile.tmp"
or die "Could not call $gpg: $!";
print D $plaintext;
close D;
(-e "$sigfile.tmp" and -s "$sigfile.tmp") or do {
unlink "$sigfile.tmp";
die "Cannot find $sigfile.tmp, signing aborted.\n";
};
open D, "< $sigfile.tmp" or die "Cannot open $sigfile.tmp: $!";
local/lib/perl5/Module/Signature.pm view on Meta::CPAN
close S;
close D;
unlink("$sigfile.tmp");
my $key_id;
my $key_name;
# This doesn't work because the output from verify goes to STDERR.
# If I try to redirect it using "--logger-fd 1" it just hangs.
# WTF?
my @verify = `$gpg --batch --verify $SIGNATURE`;
while (@verify) {
if (/key ID ([0-9A-F]+)$/) {
$key_id = $1;
} elsif (/signature from "(.+)"$/) {
$key_name = $1;
}
}
my $found_name;
my $found_key;
if (defined $key_id && defined $key_name) {
my $keyserver = _keyserver($version);
while (`$gpg --batch --keyserver=$keyserver --search-keys '$key_name'`) {
if (/^\(\d+\)/) {
$found_name = 0;
} elsif ($found_name) {
if (/key \Q$key_id\E/) {
$found_key = 1;
last;
}
}
if (/\Q$key_name\E/) {
local/lib/perl5/Module/Signature.pm view on Meta::CPAN
=head1 VARIABLES
No package variables are exported by default.
=over 4
=item $Verbose
If true, Module::Signature will give information during processing including
gpg output. If false, Module::Signature will be as quiet as possible as
long as everything is working ok. Defaults to false.
=item $SIGNATURE
The filename for a distribution's signature file. Defaults to
C<SIGNATURE>.
=item $AUTHOR
The key ID used for signature. If empty/null/0, C<gpg>'s configured default ID,
or the most recently added key within the secret keyring for C<Crypt::OpenPGP>,
will be used for the signature.
=item $KeyServer
The OpenPGP key server for fetching the author's public key
(currently only implemented on C<gpg>, not C<Crypt::OpenPGP>).
May be set to a false value to prevent this module from
fetching public keys.
=item $KeyServerPort
The OpenPGP key server port, defaults to C<11371>.
=item $Timeout
Maximum time to wait to try to establish a link to the key server.
local/lib/perl5/x86_64-linux-thread-multi/AnyEvent/Intro.pod view on Meta::CPAN
we used C<IO::Socket::INET>, ignored the problem of multiple hosts and
ignored IPv6 and a few other things that C<tcp_connect> handles for us.
But the main advantage is that we can not only run this finger function in
the background, we even can run multiple sessions in parallel, like this:
my $f1 = finger "kuriyama", "freebsd.org";
my $f2 = finger "icculus?listarchives=1", "icculus.org";
my $f3 = finger "mikachu", "icculus.org";
print "kuriyama's gpg key\n" , $f1->recv, "\n";
print "icculus' plan archive\n" , $f2->recv, "\n";
print "mikachu's plan zomgn\n" , $f3->recv, "\n";
It doesn't look like it, but in fact all three requests run in
parallel. The code waits for the first finger request to finish first, but
that doesn't keep it from executing them parallel: when the first C<recv>
call sees that the data isn't ready yet, it serves events for all three
requests automatically, until the first request has finished.
The second C<recv> call might either find the data is already there, or it
( run in 0.996 second using v1.01-cache-2.11-cpan-df04353d9ac )