blib/lib/WWW/Mechanize/Frames.pm

filter: Statementstmt 46.4% 13 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 50.0% 1 / 2 totaltotal 50.0% 18 / 36 CC 2 SCAR 9.4
CC
2
Cov
46%
get_frames
6.0
new
2.0
BEGIN
1.0
CRAP 2.6
↑ Summary
1 package WWW::Mechanize::Frames;
2
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 our $VERSION = '0.03';
6
7 1 ▶use base qw( WWW::Mechanize );
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Clone::PP qw(clone);
Subroutine BEGIN: called CC=1 SCAR=0.0
9
10 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
11 0 my $class = shift;
12 0 my %args = @_;
13 0 my $self = $class->SUPER::new( %args );
14 0 return $self;
15 }
16
17 0 ▶sub get_frames {
Subroutine get_frames: not called CC=2 SCAR=17.9
Pod undocumented
18 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__
↑ Summary