API.pm

filter: Statementstmt 80.0% 20 / 25 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod n/a totaltotal 73.5% 25 / 34 CC 2 SCAR 8.6
CC
2
Cov
74%
AUTOLOAD
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 2.4
« API/Request.pm ↑ Summary
1 #
2 # This file is part of Redmine-API
3 #
4 # This software is copyright (c) 2014 by celogeek <me@celogeek.com>.
5 #
6 # This is free software; you can redistribute it and/or modify it under
7 # the same terms as the Perl 5 programming language system itself.
8 #
9 package Redmine::API;
10  
11 # ABSTRACT: Communicate with Redmine thought the API
12  
13 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 our $VERSION = '0.04'; # VERSION
16  
17 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use Redmine::API::Request;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 1 ▶use vars qw/$AUTOLOAD/;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 0 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: not called CC=2 SCAR=17.9
23 0 my $self = shift;
24 0 my $route = substr( $AUTOLOAD, length(__PACKAGE__) + 2 );
25 0 ▶ return if $route eq 'DESTROY';
Branch: 1 branch
BranchTrueFalseTotal
if $route eq "DESTROY" 0 0 0
26 0 return Redmine::API::Request->new( api => $self, route => $route );
27 }
28  
29 1 has 'auth_key' => (
30 is => 'ro',
31 required => 1,
32 );
33  
34 1 has 'base_url' => (
35 is => 'ro',
36 required => 1,
37 );
38  
39 has 'trace' => (
40 is => 'ro',
41 0 ▶ default => sub {0},
Subroutine __ANON__: not called CC=1 SCAR=6.9
42 1 );
43  
44 1 1;
45  
46 __END__
« API/Request.pm ↑ Summary