| 1 | package Class::Easy::Log::Tie; | ||||||||||||||||||
| 2 | |||||||||||||||||||
| 3 | 16 | ▶ | sub print_stderr { | ||||||||||||||||
|
Subroutine
print_stderr: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||||||||||
| 4 | 16 | my $this = shift; | |||||||||||||||||
| 5 | 16 | my $stderr = $this->{STDERR}; | |||||||||||||||||
| 6 | |||||||||||||||||||
| 7 | 16 | ▶ | if (!defined $stderr) { | ||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||
| 8 | # enabled, but no logging | ||||||||||||||||||
| 9 | } elsif (ref($stderr) eq 'SCALAR') { | ||||||||||||||||||
| 10 | 8 | $$stderr .= $_[0] ; | |||||||||||||||||
| 11 | } elsif (ref($stderr) eq 'CODE') { | ||||||||||||||||||
| 12 | 0 | &$stderr($_[0]); | |||||||||||||||||
| 13 | } else { | ||||||||||||||||||
| 14 | 5 | print $stderr $_[0]; | |||||||||||||||||
| 15 | } | ||||||||||||||||||
| 16 | |||||||||||||||||||
| 17 | 16 | return 1; | |||||||||||||||||
| 18 | } | ||||||||||||||||||
| 19 | |||||||||||||||||||
| 20 | 8 | ▶ | sub TIESCALAR { | ||||||||||||||||
|
Subroutine
TIESCALAR: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 21 | 8 | my $class = shift; | |||||||||||||||||
| 22 | 8 | bless ({STDERR => $_[0]}, $class); | |||||||||||||||||
| 23 | } | ||||||||||||||||||
| 24 | |||||||||||||||||||
| 25 | 3 | ▶ | sub TIEHANDLE { | ||||||||||||||||
|
Subroutine
TIEHANDLE: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 26 | 3 | my $class = shift; | |||||||||||||||||
| 27 | 3 | bless ({STDERR => $_[0]}, $class); | |||||||||||||||||
| 28 | } | ||||||||||||||||||
| 29 | |||||||||||||||||||
| 30 | 10 | ▶ | sub STORE { | ||||||||||||||||
|
Subroutine
STORE: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 31 | 10 | my $this = shift; | |||||||||||||||||
| 32 | |||||||||||||||||||
| 33 | 10 | $this->print_stderr (join ("", @_)); | |||||||||||||||||
| 34 | 10 | return 1; | |||||||||||||||||
| 35 | } | ||||||||||||||||||
| 36 | |||||||||||||||||||
| 37 | |||||||||||||||||||
| 38 | 6 | ▶ | sub PRINT { | ||||||||||||||||
|
Subroutine
PRINT: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 39 | 6 | my $this = shift; | |||||||||||||||||
| 40 | |||||||||||||||||||
| 41 | 6 | $this->print_stderr (join ("", @_)); | |||||||||||||||||
| 42 | 6 | return 1; | |||||||||||||||||
| 43 | } | ||||||||||||||||||
| 44 | |||||||||||||||||||
| 45 | 0 | ▶ | sub PRINTF { | ||||||||||||||||
|
Subroutine
PRINTF: not called CC=1 SCAR=6.9
| |||||||||||||||||||
| 46 | 0 | &PRINT ($_[0], sprintf ($_[1], @_[2..$#_])); | |||||||||||||||||
| 47 | } | ||||||||||||||||||
| 48 | |||||||||||||||||||
| 49 | 0 | ▶ | sub READ {} | ||||||||||||||||
|
Subroutine
READ: not called CC=1 SCAR=0.0
| |||||||||||||||||||
| 50 | 0 | ▶ | sub FETCH {} | ||||||||||||||||
|
Subroutine
FETCH: not called CC=1 SCAR=0.0
| |||||||||||||||||||
| 51 | 0 | ▶ | sub READLINE {} | ||||||||||||||||
|
Subroutine
READLINE: not called CC=1 SCAR=0.0
| |||||||||||||||||||
| 52 | 0 | ▶ | sub GETC {} | ||||||||||||||||
|
Subroutine
GETC: not called CC=1 SCAR=0.0
| |||||||||||||||||||
| 53 | 0 | ▶ | sub WRITE {} | ||||||||||||||||
|
Subroutine
WRITE: not called CC=1 SCAR=0.0
| |||||||||||||||||||
| 54 | 0 | ▶ | sub FILENO {} | ||||||||||||||||
|
Subroutine
FILENO: not called CC=1 SCAR=0.0
| |||||||||||||||||||
| 55 | 0 | ▶ | sub CLOSE {} | ||||||||||||||||
|
Subroutine
CLOSE: not called CC=1 SCAR=0.0
| |||||||||||||||||||
| 56 | 0 | ▶ | sub DESTROY {} | ||||||||||||||||
|
Subroutine
DESTROY: not called CC=1 SCAR=0.0
| |||||||||||||||||||
| 57 | |||||||||||||||||||
| 58 | 5 | 1; | |||||||||||||||||