| 1 | package App::cdnget::Exception; | ||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use Object::Base qw(Object::Exception); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use v5.14; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use bytes; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use DateTime; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | BEGIN | ||||||||||||||||||||||||||||
| 9 | 1 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 1 | our $VERSION = '0.03'; | |||||||||||||||||||||||||||
| 11 | } | ||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 0 | ▶ | sub msg :lvalue | ||||||||||||||||||||||||||
|
Subroutine
msg: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 15 | { | ||||||||||||||||||||||||||||
| 16 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 17 | 0 | my ($msg) = @_; | |||||||||||||||||||||||||||
| 18 | 0 | my @args = @_; | |||||||||||||||||||||||||||
| 19 | 0 | ▶ | if (@args >= 1 and not ref($msg)) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
@args >= 1 and not ref $msg
MC/DC0%0/2
@args >= 1 and not ref $msg
@args >= 1
not ref $msg
Truth table0%0/3
A and not(B)
A= @args >= 1B= not ref $msg
| |||||||||||||||||||||||||||||
| 20 | { | ||||||||||||||||||||||||||||
| 21 | 0 | ▶ | $msg = "Unknown" unless $msg; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 22 | 0 | my $dts = DateTime->now(time_zone => POSIX::strftime("%z", localtime), locale => "en")->strftime('%x %T %z'); | |||||||||||||||||||||||||||
| 23 | 0 | $msg = "[$dts] $msg"; | |||||||||||||||||||||||||||
| 24 | 0 | $args[0] = $msg; | |||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | 0 | $self->SUPER::msg(@args); | |||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 1 | 1; | |||||||||||||||||||||||||||
| 31 | __END__ | ||||||||||||||||||||||||||||