WWW/GetPageTitle.pm

filter: Statementstmt 60.7% 17 / 28 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 55.5% 5 / 9 Podpod 100% 1 / 1 totaltotal 54.7% 23 / 42 CC 3 SCAR 11.0
CC
3
Cov
53%
_prepare_wheel
6.0
_process_request
6.0
_methods_define
2.0
CRAP 3.0
« WWW/Lipsum.pm ↑ Summary WebService/HtmlKitCom/FavIconFromImage.pm »
1 package POE::Component::WWW::GetPageTitle;
2  
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = '2.001002'; # VERSION
7  
8 2 ▶use POE;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use WWW::GetPageTitle;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use base 'POE::Component::NonBlockingWrapper::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 0 ▶sub _methods_define {
Subroutine _methods_define: not called CC=1 SCAR=6.9
13 0 return ( get_title => '_wheel_entry' );
14 }
15  
16 0 ▶sub get_title {
Subroutine get_title: not called CC=1 SCAR=6.9
Pod documented
17 0 $poe_kernel->post( shift->{session_id} => get_title => @_ );
18 }
19  
20 0 ▶sub _prepare_wheel {
Subroutine _prepare_wheel: not called CC=2 SCAR=17.9
21 0 my $self = shift;
22 $self->{obj} = WWW::GetPageTitle->new(
23 0 ▶ $self->{ua} ? ( ua => $self->{ua} ) : (),
Branch: 1 branch
BranchTrueFalseTotal
$self->{'ua'} ? : 0 0 0
24 );
25 }
26  
27 0 ▶sub _process_request {
Subroutine _process_request: not called CC=2 SCAR=17.9
28 0 my ( $self, $in_ref ) = @_;
29 0 my $t = $self->{obj};
30 0 $t->get_title( $in_ref->{page} );
31  
32 0 ▶ if ( my $error = $t->error ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $error = $t->error) { } 0 0 0
33 0 $in_ref->{error} = $error;
34 }
35 else {
36 0 $in_ref->{title} = $t->title;
37 }
38  
39 0 return;
40 }
41  
42 2 1;
43 __END__
« WWW/Lipsum.pm ↑ Summary WebService/HtmlKitCom/FavIconFromImage.pm »