App-PAUSE-Comaint
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/App/PAUSE/Comaint.pm view on Meta::CPAN
my $scanner = App::PAUSE::Comaint::PackageScanner->new('http://cpanmetadb.plackperl.org');
my @packages = $scanner->find($module);
@packages or die "Couldn't find module '$module' in 02packages\n";
$self->login_pause;
$self->make_comaint($comaint, \@packages);
}
sub get_credentials {
my $self = shift;
my %rc;
my $file = "$ENV{HOME}/.pause";
if (eval { require Config::Identity }) {
%rc = Config::Identity->load($file);
} else {
open my $in, "<", $file
or die "Can't open $file: $!";
while (<$in>) {
/^(\S+)\s+(.*)/ and $rc{$1} = $2;
}
}
return @rc{qw(user password)};
}
sub login_pause {
my $self = shift;
$self->mech->credentials($self->get_credentials);
$self->mech->get("https://pause.perl.org/pause/authenquery?ACTION=share_perms");
$self->mech->form_number(1);
$self->mech->click('weaksubmit_pause99_share_perms_makeco');
$self->mech->content =~ /Select a co-maintainer/
or die "Something is wrong with Screen-scraping: ", $self->mech->content;
}
sub make_comaint {
script/comaint view on Meta::CPAN
=over 4
=item *
You have to have a CPAN mirror cache in C<~/.cpanm> to find the
related packages. You can run `cpanm --mirror-only strict` once to get
that cache.
=item *
Your PAUSE credentials have to be saved in C<~/.pause> file, the same
as the one used by CPAN uploader.
=back
=head1 AUTHOR
Tatsuhiko Miyagawa
=cut
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.607 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )