| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package WWW::Rapidshare::Free; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 2 |  |  | 2 |  | 147477 | use strict; | 
|  | 2 |  |  |  |  | 6 |  | 
|  | 2 |  |  |  |  | 101 |  | 
| 4 |  |  |  |  |  |  |  | 
| 5 |  |  |  |  |  |  | BEGIN { | 
| 6 | 2 |  |  | 2 |  | 7 | $^W = 1; | 
| 7 | 2 |  |  |  |  | 44 | $|  = 1; | 
| 8 |  |  |  |  |  |  | } | 
| 9 |  |  |  |  |  |  |  | 
| 10 | 2 |  |  | 2 |  | 2985 | use WWW::Mechanize; | 
|  | 2 |  |  |  |  | 3745367 |  | 
|  | 2 |  |  |  |  | 98 |  | 
| 11 | 2 |  |  | 2 |  | 28 | use HTML::Form; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 46 |  | 
| 12 | 2 |  |  | 2 |  | 12 | use HTML::Parser; | 
|  | 2 |  |  |  |  | 5 |  | 
|  | 2 |  |  |  |  | 265 |  | 
| 13 | 2 |  |  | 2 |  | 3011 | use Data::Validate::URI qw( is_http_uri ); | 
|  | 2 |  |  |  |  | 151542 |  | 
|  | 2 |  |  |  |  | 146 |  | 
| 14 | 2 |  |  | 2 |  | 20 | use Carp qw( croak ); | 
|  | 2 |  |  |  |  | 5 |  | 
|  | 2 |  |  |  |  | 91 |  | 
| 15 | 2 |  |  | 2 |  | 10 | use Exporter; | 
|  | 2 |  |  |  |  | 5 |  | 
|  | 2 |  |  |  |  | 3433 |  | 
| 16 |  |  |  |  |  |  |  | 
| 17 |  |  |  |  |  |  | our $VERSION = '0.01'; | 
| 18 |  |  |  |  |  |  |  | 
| 19 |  |  |  |  |  |  | our @ISA       = qw( Exporter ); | 
| 20 |  |  |  |  |  |  | our @EXPORT_OK = qw( links add_links add_links_from_file check_links download | 
| 21 |  |  |  |  |  |  | verbose connection clear_links ); | 
| 22 |  |  |  |  |  |  | our %EXPORT_TAGS = ( all => \@EXPORT_OK ); | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | my $parser = HTML::Parser->new( | 
| 25 |  |  |  |  |  |  | api_version    => 3, | 
| 26 |  |  |  |  |  |  | start_h        => [ \&_start, 'tagname, attr' ], | 
| 27 |  |  |  |  |  |  | text_h         => [ \&_text, 'text' ], | 
| 28 |  |  |  |  |  |  | end_document_h => [ \&_end_document ], | 
| 29 |  |  |  |  |  |  | ); | 
| 30 |  |  |  |  |  |  | my $mech = WWW::Mechanize->new; | 
| 31 |  |  |  |  |  |  | my ( $tagname, $class, $verbose, $counter, $check_links, $error, @links, | 
| 32 |  |  |  |  |  |  | @download_links ) | 
| 33 |  |  |  |  |  |  | = ( '', '', 1, 0 ); | 
| 34 |  |  |  |  |  |  | my $delay = 120;    # An explicit value which will most likely be overwritten | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | my @text; | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | # Gets the tagname and also marks the start of the error tag: | 
| 39 |  |  |  |  |  |  | #   | 
| 40 |  |  |  |  |  |  | sub _start { | 
| 41 | 0 |  |  | 0 |  | 0 | $tagname = shift; | 
| 42 | 0 | 0 | 0 |  |  | 0 | $class   = 'klappbox' | 
| 43 |  |  |  |  |  |  | if ( exists $_[0]->{'class'} && $_[0]->{'class'} eq 'klappbox' ); | 
| 44 |  |  |  |  |  |  | } | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | # Stores contents of |