Pithub/Markdown.pm

filter: Statementstmt 100% 16 / 16 Branchbran 75.0% 3 / 4 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 89.6% 26 / 29 CC 5 SCAR 13.7
CC
5
Cov
91%
render
5.1
BEGIN
1.0
BEGIN
1.0
CRAP 3.9
« Pithub/Repos/Stats.pm ↑ Summary Pithub/Repos/Releases/Assets.pm »
1 package Pithub::Markdown;
2 16 our $AUTHORITY = 'cpan:PLU';
3 16 our $VERSION = '0.01041';
4  
5 # ABSTRACT: Github v3 Markdown API
6  
7 16 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 16 ▶use Carp qw( croak );
Subroutine BEGIN: called CC=1 SCAR=0.0
9 16 extends 'Pithub::Base';
10  
11 16 has [qw( mode context )] => ( is => 'rw' );
12  
13  
14 sub render {
15 2 ▶ my ( $self, %args ) = @_;
Subroutine render: called CC=5 SCAR=16.3
Pod documented
16 croak 'Missing key in parameters: data (hashref)'
17 2 ▶ unless defined $args{data};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $args{"data"} 0 2 2
18  
19 2 for (qw( context mode )) {
20 4 ▶ $args{data}{$_} = $self->$_ if !exists $args{data}{$_} and $self->$_;
Branch: 1 branch
BranchTrueFalseTotal
if not exists $args{"data"}{$_} and $self->$_ 2 2 4
Condition66%2/3
not exists $args{"data"}{$_} and $self->$_
!ll&&!rl&&r
022
MC/DC50%1/2
not exists $args{"data"}{$_} and $self->$_
not exists $args{"data"}{$_} $self->$_
Truth table66%2/3
not(A) and B
A= not exists $args{"data"}{$_}B= $self->$_
ABresult
0X0
100
111
21 }
22  
23 2 return $self->request(
24 method => 'POST',
25 path => '/markdown',
26 %args,
27 );
28 }
29  
30 16 1;
31  
32 __END__
« Pithub/Repos/Stats.pm ↑ Summary Pithub/Repos/Releases/Assets.pm »