| 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
| |||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 2 | for (qw( context mode )) { | |||||||||||||||||||||||||||
| 20 | 4 | ▶ | $args{data}{$_} = $self->$_ if !exists $args{data}{$_} and $self->$_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
not exists $args{"data"}{$_} and $self->$_
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->$_
| |||||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 2 | return $self->request( | |||||||||||||||||||||||||||
| 24 | method => 'POST', | ||||||||||||||||||||||||||||
| 25 | path => '/markdown', | ||||||||||||||||||||||||||||
| 26 | %args, | ||||||||||||||||||||||||||||
| 27 | ); | ||||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 16 | 1; | |||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | __END__ | ||||||||||||||||||||||||||||