| 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__ | ||