| 1 | package Net::NATS2::ConnectInfo; | ||||||||||
| 2 | |||||||||||
| 3 | 5 | ▶ | use v5.10; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | sub _new { | ||||||||||
| 8 | 1 | ▶ | my $class = shift; | ||||||||
|
Subroutine
_new: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | return bless {@_}, $class; | |||||||||
| 10 | } | ||||||||||
| 11 | |||||||||||
| 12 | sub verbose { | ||||||||||
| 13 | 4 | ▶ | my $self = shift; | ||||||||
|
Subroutine
verbose: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 14 | 4 | ▶ | $self->{verbose} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 4 | return $self->{verbose}; | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | sub pedantic { | ||||||||||
| 19 | 3 | ▶ | my $self = shift; | ||||||||
|
Subroutine
pedantic: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 20 | 3 | ▶ | $self->{pedantic} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 3 | return $self->{pedantic}; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | sub ssl_required { | ||||||||||
| 25 | 0 | ▶ | goto &tls_required; | ||||||||
|
Subroutine
ssl_required: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | sub tls_required { | ||||||||||
| 29 | 5 | ▶ | my $self = shift; | ||||||||
|
Subroutine
tls_required: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 30 | 5 | ▶ | $self->{tls_required} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | 5 | return $self->{tls_required}; | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | sub headers { | ||||||||||
| 35 | 4 | ▶ | my $self = shift; | ||||||||
|
Subroutine
headers: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 36 | 4 | ▶ | $self->{headers} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | 4 | return $self->{headers}; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | sub auth_token { | ||||||||||
| 41 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
auth_token: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 42 | 0 | ▶ | $self->{auth_token} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 43 | 0 | return $self->{auth_token}; | |||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | sub user { | ||||||||||
| 47 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
user: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 48 | 0 | ▶ | $self->{user} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 49 | 0 | return $self->{user}; | |||||||||
| 50 | } | ||||||||||
| 51 | |||||||||||
| 52 | sub pass { | ||||||||||
| 53 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
pass: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 54 | 0 | ▶ | $self->{pass} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 55 | 0 | return $self->{pass}; | |||||||||
| 56 | } | ||||||||||
| 57 | |||||||||||
| 58 | sub name { | ||||||||||
| 59 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
name: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 60 | 0 | ▶ | $self->{name} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 61 | 0 | return $self->{name}; | |||||||||
| 62 | } | ||||||||||
| 63 | |||||||||||
| 64 | sub lang { | ||||||||||
| 65 | 1 | ▶ | my $self = shift; | ||||||||
|
Subroutine
lang: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||
| 66 | 1 | ▶ | $self->{lang} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 67 | 1 | return $self->{lang}; | |||||||||
| 68 | } | ||||||||||
| 69 | |||||||||||
| 70 | sub version { | ||||||||||
| 71 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
version: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 72 | 0 | ▶ | $self->{version} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 73 | 0 | return $self->{version}; | |||||||||
| 74 | } | ||||||||||
| 75 | |||||||||||
| 76 | sub new { | ||||||||||
| 77 | 1 | ▶ | my $class = shift; | ||||||||
|
Subroutine
new: called CC=5 SCAR=17.0
Pod
undocumented
| |||||||||||
| 78 | 1 | my $self = $class->_new(@_); | |||||||||
| 79 | |||||||||||
| 80 | 1 | ▶ | $self->verbose(0) unless $self->verbose; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 81 | 1 | ▶ | $self->pedantic(0) unless $self->pedantic; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 82 | 1 | ▶ | $self->tls_required(0) unless $self->tls_required; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 83 | 1 | ▶ | $self->headers(0) unless $self->headers; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 84 | |||||||||||
| 85 | 1 | return $self; | |||||||||
| 86 | } | ||||||||||
| 87 | |||||||||||
| 88 | sub TO_JSON { | ||||||||||
| 89 | 1 | ▶ | my $self = shift; | ||||||||
|
Subroutine
TO_JSON: called CC=5 SCAR=16.8
Pod
undocumented
| |||||||||||
| 90 | 1 | my $hash = {%{$self}}; | |||||||||
| 91 | 1 | ▶ | $hash->{verbose} = $self->verbose ? \1 : \0; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 92 | 1 | ▶ | $hash->{pedantic} = $self->pedantic ? \1 : \0; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 93 | 1 | ▶ | $hash->{tls_required} = $self->tls_required ? \1 : \0; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 94 | 1 | ▶ | $hash->{headers} = $self->headers ? \1 : \0; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 95 | 1 | return $hash; | |||||||||
| 96 | } | ||||||||||
| 97 | |||||||||||
| 98 | 5 | 1; | |||||||||