File Coverage

blib/lib/Enbld/Target/Attribute/IndexSite.pm
Criterion Covered Total %
statement 22 22 100.0
branch 4 4 100.0
condition n/a
subroutine 6 6 100.0
pod 0 1 0.0
total 32 33 96.9


line stmt bran cond sub pod time code
1             package Enbld::Target::Attribute::IndexSite;
2              
3 4     4   11017 use strict;
  4         7  
  4         141  
4 4     4   16 use warnings;
  4         5  
  4         105  
5              
6 4     4   29 use Carp;
  4         6  
  4         331  
7              
8 4     4   429 use parent qw/Enbld::Target::AttributeExtension::URL/;
  4         236  
  4         24  
9              
10             sub initialize {
11 57     57 0 119 my ( $self, $param ) = @_;
12              
13 57 100       184 if ( ! defined $param ) {
14             $self->{callback} = sub {
15 34     34   210 return $self->{attributes}->DownloadSite;
16 47         297 };
17              
18 47         120 return $self;
19             }
20              
21 10 100       20 if ( $param ) {
22 9         57 $self->SUPER::initialize( $param );
23 9         12 return $self;
24             }
25              
26 1         4 require Enbld::Exception;
27 1         5 croak( Enbld::Exception->new( "Attribute 'IndexSite' isn't defined" ) );
28             }
29              
30             1;