App-PAUSE-Comaint
view release on metacpan or search on metacpan
lib/App/PAUSE/Comaint.pm view on Meta::CPAN
package App::PAUSE::Comaint;
use strict;
use 5.008_001;
our $VERSION = '0.08';
use App::PAUSE::Comaint::PackageScanner;
use WWW::Mechanize;
use ExtUtils::MakeMaker qw(prompt);
sub new {
my($class) = @_;
bless { mech => WWW::Mechanize->new }, $class;
}
sub mech { $_[0]->{mech} }
sub run {
my($self, $module, $comaint) = @_;
lib/App/PAUSE/Comaint.pm view on Meta::CPAN
}
$form->find_input("pause99_share_perms_makeco_a")->value($author);
print "Going to make $author as a comaint of the following modules.\n\n";
for my $package (@$packages) {
print " $package\n";
}
print "\n";
my $value = prompt "Are you sure?", "y";
return if lc($value) ne 'y';
$self->mech->click_button(value => 'Make Co-Maintainer');
if (my @results = ($self->mech->content =~ /<p class="(?:result|warning)">(Added .*? to co-maint.*?|\w+ was already a co-maint.*?: skipping)<\/p>/g)) {
print "\n", join("\n", @results), "\n";
} else {
warn "Something's wrong: ", $self->mech->content;
}
}
script/comaint view on Meta::CPAN
comaint Plack::Middleware::ReverseProxy MIYAGAWA
it will gather all packages included in the
Plack-Middleware-ReverseProxy distribution, and try to make MIYAGAWA
as a comaint for all of them.
The script is written in a defensive manner so that if you specify a
module that you don't have a primary maintainership on, it will complain
about that.
There's also a prompt before actually making someone a co-maint.
=head1 PREREQUISITES
=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.
( run in 1.203 second using v1.01-cache-2.11-cpan-6aa56a78535 )