| 1 | package PLP::Tie::Print; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 2 | our $VERSION = '1.00'; | |||||||||
| 7 | |||||||||||
| 8 | =head1 PLP::Tie::Print | ||||||||||
| 9 | |||||||||||
| 10 | Just prints to stdout, but sends headers if not sent before. | ||||||||||
| 11 | |||||||||||
| 12 | tie *HANDLE, 'PLP::Tie::Print'; | ||||||||||
| 13 | |||||||||||
| 14 | This module is part of the PLP Internals and probably not of much use to others. | ||||||||||
| 15 | |||||||||||
| 16 | =cut | ||||||||||
| 17 | |||||||||||
| 18 | 23 | ▶ | sub TIEHANDLE { bless \my $dummy, $_[0] } | ||||||||
|
Subroutine
TIEHANDLE: called CC=1 SCAR=0.0
| |||||||||||
| 19 | |||||||||||
| 20 | 0 | ▶ | sub WRITE { undef } | ||||||||
|
Subroutine
WRITE: not called CC=1 SCAR=6.9
| |||||||||||
| 21 | |||||||||||
| 22 | 35 | ▶ | sub PRINT { | ||||||||
|
Subroutine
PRINT: called CC=3 SCAR=11.0
| |||||||||||
| 23 | 35 | shift; | |||||||||
| 24 | 35 | ▶ | return unless grep length, @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | 23 | ▶ | PLP::sendheaders() unless $PLP::sentheaders; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 23 | print STDOUT @_; | |||||||||
| 27 | 23 | select STDOUT; | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 0 | ▶ | sub PRINTF { | ||||||||
|
Subroutine
PRINTF: not called CC=3 SCAR=24.8
| |||||||||||
| 31 | 0 | shift; | |||||||||
| 32 | 0 | ▶ | return unless length $_[0]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 0 | ▶ | PLP::sendheaders() unless $PLP::sentheaders; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 0 | printf STDOUT @_; | |||||||||
| 35 | 0 | select STDOUT; | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | 0 | ▶ | sub READ { undef } | ||||||||
|
Subroutine
READ: not called CC=1 SCAR=6.9
| |||||||||||
| 39 | |||||||||||
| 40 | 0 | ▶ | sub READLINE { undef } | ||||||||
|
Subroutine
READLINE: not called CC=1 SCAR=6.9
| |||||||||||
| 41 | |||||||||||
| 42 | 0 | ▶ | sub GETC { '%' } | ||||||||
|
Subroutine
GETC: not called CC=1 SCAR=6.9
| |||||||||||
| 43 | |||||||||||
| 44 | 0 | ▶ | sub CLOSE { undef } | ||||||||
|
Subroutine
CLOSE: not called CC=1 SCAR=6.9
| |||||||||||
| 45 | |||||||||||
| 46 | 0 | ▶ | sub UNTIE { undef } | ||||||||
|
Subroutine
UNTIE: not called CC=1 SCAR=6.9
| |||||||||||
| 47 | |||||||||||
| 48 | 21 | ▶ | sub DESTROY { undef } | ||||||||
|
Subroutine
DESTROY: called CC=1 SCAR=0.0
| |||||||||||
| 49 | |||||||||||
| 50 | 2 | 1; | |||||||||
| 51 | |||||||||||