App-sync_cpantesters
view release on metacpan or search on metacpan
lib/App/sync_cpantesters.pm view on Meta::CPAN
Be more verbose.
=head2 run
The main method, which is called by the C<sync_cpantesters> program.
Call this after you've set the relevant accessors described above.
You can add a trigger to this class to filter distributions after they
have been scraped from the web page and before the individual reports
are being downloaded. See L</TRIGGERS> below.
=head2 get
Takes a URL, downloads and returns the contents. A progress bar is
displayed during the download.
=head2 log
Takes arguments like C<sprintf> and prints them only if C<verbose()>
is true. The string will have exactly one newline character at the
end.
=head1 TRIGGERS
This class supports a trigger in the style of L<Class::Trigger>.
=over 4
=item dist.filter
This trigger is called after the data has been scraped from the web
page but before the individual testing reports are being downloaded.
The trigger is given an array reference to the distributions; each
element is a hash that contains the distribution name as well as a
list of the failure reports.
For example, suppose you keep the currently maintained distributions
in a directory and the deprecated ones, the ones you won't support
anymore, in another directory. Then you might want to download only
those reports for distributions you maintain. Use something like this:
use App::sync_cpantesters;
App::sync_cpantesters->add_trigger(
'dist.filter' => sub {
my ($class, $dist) = @_;
@$dist = grep { -d "$ENV{HOME}/code/$_->{name}" } @$dist;
}
);
App::sync_cpantesters->new(
author => 'MARCEL',
base_dir => '~/dev/cpan-testers',
verbose => 1,
)->run;
=back
=head1 INSTALLATION
See perlmodinstall for information and options on installing Perl modules.
=head1 BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests through the web interface at
L<http://rt.cpan.org/Public/Dist/Display.html?Name=App-sync_cpantesters>.
=head1 AVAILABILITY
The latest version of this module is available from the Comprehensive Perl
Archive Network (CPAN). Visit L<http://www.perl.com/CPAN/> to find a CPAN
site near you, or see L<http://search.cpan.org/dist/App-sync_cpantesters/>.
The development version lives at L<http://github.com/hanekomu/App-sync_cpantesters>
and may be cloned from L<git://github.com/hanekomu/App-sync_cpantesters.git>.
Instead of sending patches, please fork this project using the standard
git and github infrastructure.
=head1 AUTHOR
Marcel Gruenauer <marcel@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Marcel Gruenauer.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
( run in 2.199 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )