| 1 | package Crypt::OpenPGP::ErrorHandler; | ||||||||||
| 2 | 16 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 16 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 16 | our $VERSION = '1.21'; # VERSION | |||||||||
| 6 | |||||||||||
| 7 | 16 | our $ERROR; | |||||||||
| 8 | |||||||||||
| 9 | 0 | ▶ | sub new { bless {}, shift } | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 10 | 10 | ▶ | sub error { | ||||||||
|
Subroutine
error: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 11 | 10 | my $msg = $_[1]; | |||||||||
| 12 | 10 | ▶ | $msg .= "\n" unless $msg =~ /\n$/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | 10 | ▶ | if (ref($_[0])) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 2 | $_[0]->{_errstr} = $msg; | |||||||||
| 15 | } else { | ||||||||||
| 16 | 8 | $ERROR = $msg; | |||||||||
| 17 | } | ||||||||||
| 18 | 10 | return; | |||||||||
| 19 | } | ||||||||||
| 20 | 3 | ▶ | sub errstr { ref($_[0]) ? $_[0]->{_errstr} : $ERROR } | ||||||||
|
Subroutine
errstr: called CC=2 SCAR=6.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 21 | |||||||||||
| 22 | 16 | 1; | |||||||||
| 23 | __END__ | ||||||||||