forked from barbie/cpan-testers-www-statistics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getmailrc.pl
executable file
·80 lines (51 loc) · 1.76 KB
/
getmailrc.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/perl
use strict;
$|++;
my $VERSION = '0.02';
#----------------------------------------------------------------------------
=head1 NAME
getmailrc.pl - downloads 01mailrc.txt.gz from CPAN.
=head1 SYNOPSIS
perl getmailrc.pl
=head1 DESCRIPTION
Downloads the latest copy of the authors index file from CPAN, and extracts
the text file from the archive.
=cut
# -------------------------------------
# Library Modules
use File::Basename;
use WWW::Mechanize;
use Archive::Extract;
# -------------------------------------
# Program
my $mech = WWW::Mechanize->new();
my $source = 'http://www.cpan.org/authors/01mailrc.txt.gz';
my $target = basename($source);
chdir('data');
$mech->mirror($source,$target);
my $ae = Archive::Extract->new( archive => $target );
unless($ae->extract) {
die 'Failed to extract the archive [$target]';
}
__END__
=head1 BUGS, PATCHES & FIXES
There are no known bugs at the time of this release. However, if you spot a
bug or are experiencing difficulties, that is not explained within the POD
documentation, please send bug reports and patches to the RT Queue (see below).
Fixes are dependant upon their severity and my availablity. Should a fix not
be forthcoming, please feel free to (politely) remind me.
RT Queue -
http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Testers-WWW-Statistics
=head1 SEE ALSO
L<CPAN::WWW::Testers::Generator>,
L<CPAN::WWW::Testers>
F<http://www.cpantesters.org/>,
F<http://stats.cpantesters.org/>
=head1 AUTHOR
Barbie, <barbie@cpan.org>
for Miss Barbell Productions <http://www.missbarbell.co.uk>.
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2008 Barbie for Miss Barbell Productions.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=cut