File Coverage

blib/lib/WWW/Mechanize/Frames.pm
Criterion Covered Total %
statement 12 27 44.4
branch n/a
condition n/a
subroutine 4 6 66.6
pod 1 2 50.0
total 17 35 48.5


line stmt bran cond sub pod time code
1             package WWW::Mechanize::Frames;
2            
3 1     1   25943 use strict;
  1         1  
  1         43  
4 1     1   5 use warnings FATAL => 'all';
  1         1  
  1         63  
5             our $VERSION = '0.03';
6            
7 1     1   6 use base qw( WWW::Mechanize );
  1         6  
  1         1418  
8 1     1   382639 use Clone::PP qw(clone);
  1         824  
  1         7  
9            
10             sub new {
11 0     0 1   my $class = shift;
12 0           my %args = @_;
13 0           my $self = $class->SUPER::new( %args );
14 0           return $self;
15             }
16            
17             sub get_frames {
18 0     0 0   my $self = shift;
19 0           my $num = 0;
20 0           my @array;
21 0           my @links = $self->find_all_links( tag_regex => qr/^(iframe|frame)$/ );
22 0           foreach my $link (@links) {
23 0           ++$num;
24 0           my $link = $link->url_abs;
25 0           my $clone = clone($self);
26 0           $clone ->get($link);
27 0           $array[$num-1] = $clone;
28             }
29 0           return @array;
30             }
31            
32             __END__