File Coverage

blib/lib/WWW/HugeURL.pm
Criterion Covered Total %
statement 7 9 77.7
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 12 83.3


line stmt bran cond sub pod time code
1             package WWW::HugeURL;
2              
3             =head1 NAME
4              
5             WWW::HugeURL - Because bigger is better, right?
6              
7             =cut
8              
9 1     1   30837 use strict;
  1         4  
  1         47  
10 1     1   5 use warnings;
  1         3  
  1         81  
11 1     1   2020 use WWW::Mechanize;
  0            
  0            
12             our $VERSION = '0.01';
13              
14             require Exporter;
15             our @ISA = qw(Exporter);
16             our @EXPORT = qw(makehugelink);
17              
18             sub makehugelink {
19             my $short = shift;
20             my $mech = WWW::Mechanize->new;
21             $mech->get('http://hugeurl.com');
22             $mech->submit_form(
23             form_number => 1,
24             fields => {
25             encode_url => $short,
26             }
27             );
28             my $content = $mech->content();
29             $content =~ m{};
30             return $1;
31             }
32              
33             1;
34              
35             =head1 COPYRIGHT
36              
37             Copyright 2004 by Kang-min Liu .
38              
39             This program is free software; you can redistribute it and/or
40             modify it under the same terms as Perl itself.
41              
42             See
43              
44             =cut