File Coverage

blib/lib/Footprintless/Plugin/Atlassian/Confluence.pm
Criterion Covered Total %
statement 17 17 100.0
branch 3 4 75.0
condition 3 6 50.0
subroutine 6 6 100.0
pod 1 1 100.0
total 30 34 88.2


line stmt bran cond sub pod time code
1 1     1   125102 use strict;
  1         4  
  1         22  
2 1     1   4 use warnings;
  1         2  
  1         51  
3              
4             package Footprintless::Plugin::Atlassian::Confluence;
5             $Footprintless::Plugin::Atlassian::Confluence::VERSION = '1.03';
6             # ABSTRACT: A Footprintless plugin for working with Atlassian Confluence
7             # PODNAME: Footprintless::Plugin::Atlassian::Confluence
8              
9 1     1   5 use parent qw(Footprintless::Plugin);
  1         2  
  1         4  
10              
11             sub _client {
12 2     2   12 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 66     41 && $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     20 && $self->{config}{response_parser_module} );
20              
21 2         558 require Footprintless::Plugin::Atlassian::Confluence::Client;
22 2         28 return Footprintless::Plugin::Atlassian::Confluence::Client->new( $footprintless,
23             $coordinate, %options );
24             }
25              
26             sub factory_methods {
27 2     2 1 135775 my ($self) = @_;
28             return {
29             confluence_client => sub {
30 2     2   15 return $self->_client(@_);
31             },
32 2         43 };
33             }
34              
35             1;
36              
37             __END__