File Coverage

blib/lib/Footprintless/Plugin/Atlassian/Confluence.pm
Criterion Covered Total %
statement 17 17 100.0
branch 3 4 75.0
condition 2 6 33.3
subroutine 6 6 100.0
pod 1 1 100.0
total 29 34 85.2


line stmt bran cond sub pod time code
1 1     1   74805 use strict;
  1         1  
  1         21  
2 1     1   3 use warnings;
  1         1  
  1         41  
3              
4             package Footprintless::Plugin::Atlassian::Confluence;
5             $Footprintless::Plugin::Atlassian::Confluence::VERSION = '1.02';
6             # ABSTRACT: A Footprintless plugin for working with Atlassian Confluence
7             # PODNAME: Footprintless::Plugin::Atlassian::Confluence
8              
9 1     1   330 use parent qw(Footprintless::Plugin);
  1         197  
  1         3  
10              
11             sub _client {
12 2     2   5 my ( $self, $footprintless, $coordinate, %options ) = @_;
13              
14             $options{request_builder_module} = $self->{config}{request_builder_module}
15             if ( !$options{request_builder_module}
16 2 100 33     23 && $self->{config}{request_builder_module} );
17             $options{response_parser_module} = $self->{config}{response_parser_module}
18             if ( !$options{response_parser_module}
19 2 50 33     19 && $self->{config}{response_parser_module} );
20              
21 2         513 require Footprintless::Plugin::Atlassian::Confluence::Client;
22 2         79 return Footprintless::Plugin::Atlassian::Confluence::Client->new( $footprintless,
23             $coordinate, %options );
24             }
25              
26             sub factory_methods {
27 2     2 1 124390 my ($self) = @_;
28             return {
29             confluence_client => sub {
30 2     2   17 return $self->_client(@_);
31             },
32 2         36 };
33             }
34              
35             1;
36              
37             __END__