| 1 | package HTML::Zoom::ReadFH; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 15 | ▶ | use strictures 1; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | sub from_zoom { | ||||||||||||||||||||
| 6 | 2 | ▶ | my ($class, $zoom) = @_; | ||||||||||||||||||
|
Subroutine
from_zoom: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 7 | 2 | bless({ _zoom => $zoom }, $class) | |||||||||||||||||||
| 8 | } | ||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | sub to_zoom { | ||||||||||||||||||||
| 11 | 0 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
to_zoom: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 12 | # A small defense against accidental footshots. I hope. | ||||||||||||||||||||
| 13 | # If this turns out to merely re-aim the gun at your left nipple, please | ||||||||||||||||||||
| 14 | # come complain with a documented use case and we'll discuss deleting it. | ||||||||||||||||||||
| 15 | die "Already started reading - there ain't no going back now" | ||||||||||||||||||||
| 16 | 0 | ▶ | if $self->{_stream}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 17 | $self->{_zoom} | ||||||||||||||||||||
| 18 | 0 | } | |||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | sub getline { | ||||||||||||||||||||
| 21 | 5 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
getline: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||||||||||||
| 22 | 5 | my $html; | |||||||||||||||||||
| 23 | 5 | ▶ | my $stream = $self->{_stream} ||= $self->{_zoom}->to_stream; | ||||||||||||||||||
|
Condition66%2/3
$self->{"_stream"} ||= $self->{"_zoom"}->to_stream
MC/DC0%0/2
$self->{"_stream"} ||= $self->{"_zoom"}->to_stream
$self->{"_stream"}
$self->{"_zoom"}->to_stream
Truth table66%2/3
A ||= B
A= $self->{"_stream"}B= $self->{"_zoom"}->to_stream
| |||||||||||||||||||||
| 24 | 5 | ▶ | my $producer = $self->{_producer} ||= $self->{_zoom}->zconfig->producer; | ||||||||||||||||||
|
Condition66%2/3
$self->{"_producer"} ||= $self->{"_zoom"}->zconfig->producer
MC/DC0%0/2
$self->{"_producer"} ||= $self->{"_zoom"}->zconfig->producer
$self->{"_producer"}
$self->{"_zoom"}->zconfig->producer
Truth table66%2/3
A ||= B
A= $self->{"_producer"}B= $self->{"_zoom"}->zconfig->producer
| |||||||||||||||||||||
| 25 | 5 | ▶ | while (my ($evt) = $stream->next) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 26 | 32 | $html .= $producer->event_to_html($evt); | |||||||||||||||||||
| 27 | 32 | ▶ | last if $evt->{flush}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 28 | } | ||||||||||||||||||||
| 29 | 5 | return $html | |||||||||||||||||||
| 30 | } | ||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | 0 | ▶ | sub close { "The door shuts behind you with a ominous boom" } | ||||||||||||||||||
|
Subroutine
close: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 15 | 1; | |||||||||||||||||||