| 1 | # | ||||||||||||||||||||
| 2 | # This file is part of GitHub-API | ||||||||||||||||||||
| 3 | # | ||||||||||||||||||||
| 4 | # This software is Copyright (c) 2013 by Chris Weyl. | ||||||||||||||||||||
| 5 | # | ||||||||||||||||||||
| 6 | # This is free software, licensed under: | ||||||||||||||||||||
| 7 | # | ||||||||||||||||||||
| 8 | # The GNU Lesser General Public License, Version 2.1, February 1999 | ||||||||||||||||||||
| 9 | # | ||||||||||||||||||||
| 10 | package GitHub::API::Repo::Keys; | ||||||||||||||||||||
| 11 | { | ||||||||||||||||||||
| 12 | 5 | $GitHub::API::Repo::Keys::VERSION = '0.000000_03'; | |||||||||||||||||||
| 13 | } | ||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | # ABSTRACT: A list of a repository's hooks | ||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 5 | ▶ | use common::sense; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | 5 | ▶ | use autobox::Core; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 5 | ▶ | use parent 'GitHub::API::Base'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | #use aliased 'GitHub::API::Hook'; | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | # debugging... | ||||||||||||||||||||
| 25 | #use Smart::Comments '###'; | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 0 | ▶ | sub all { | ||||||||||||||||||
|
Subroutine
all: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 29 | 0 | my $self = shift @_; | |||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | 0 | ▶ | return $self->{_keys} //= $self->_get; | ||||||||||||||||||
|
Condition0%0/3
$self->{"_keys"} //= $self->_get
MC/DC0%0/2
$self->{"_keys"} //= $self->_get
$self->{"_keys"}
$self->_get
Truth table0%0/3
A //= B
A= $self->{"_keys"}B= $self->_get
| |||||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 0 | ▶ | sub create { | ||||||||||||||||||
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 36 | 0 | my ($self, %key) = @_; | |||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | 0 | delete $self->{_keys}; | |||||||||||||||||||
| 39 | 0 | my $key = $self->_post(\%key); | |||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | 0 | return $key; | |||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | 0 | ▶ | sub rm { | ||||||||||||||||||
|
Subroutine
rm: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 46 | 0 | my ($self, $id) = @_; | |||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | 0 | delete $self->{_keys}; | |||||||||||||||||||
| 49 | 0 | return $self->_delete(undef, "/$id"); | |||||||||||||||||||
| 50 | } | ||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | 5 | !!42; | |||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | __END__ | ||||||||||||||||||||