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   85345 use strict;
  1         2  
  1         27  
2 1     1   4 use warnings;
  1         1  
  1         51  
3              
4             package Footprintless::Plugin::Atlassian::Confluence;
5             $Footprintless::Plugin::Atlassian::Confluence::VERSION = '1.01';
6             # ABSTRACT: A Footprintless plugin for working with Atlassian Confluence
7             # PODNAME: Footprintless::Plugin::Atlassian::Confluence
8              
9 1     1   405 use parent qw(Footprintless::Plugin);
  1         218  
  1         4  
10              
11             sub _client {
12 2     2   6 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     38 && $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     21 && $self->{config}{response_parser_module} );
20              
21 2         744 require Footprintless::Plugin::Atlassian::Confluence::Client;
22 2         32 return Footprintless::Plugin::Atlassian::Confluence::Client->new( $footprintless,
23             $coordinate, %options );
24             }
25              
26             sub factory_methods {
27 2     2 1 139156 my ($self) = @_;
28             return {
29             confluence_client => sub {
30 2     2   19 return $self->_client(@_);
31             },
32 2         34 };
33             }
34              
35             1;
36              
37             __END__