Pager/Page.pm

filter: Statementstmt 100% 15 / 15 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 91.6% 22 / 24 SCAR 11.0
CC
3
Cov
89%
import
2.1
BEGIN
2.0
BEGIN
1.0
CRAP 3.0
« Pager/Unbuffered.pm ↑ Summary
1 package IO::Pager::Page;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 our $VERSION = 1.04; #Untouched since 1.02
6  
7  
8 # The meat
9 BEGIN {
10 # Do nothing in Perl compile mode
11 2 ▶ return if $^C;
Subroutine BEGIN: called CC=2 SCAR=7.0
Branch: 1 branch
BranchTrueFalseTotal
if $^C 0 2 2
12 # Find a pager
13 2 ▶ use IO::Pager;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 # Pipe stdout to it
15 2 new IO::Pager *STDOUT, 'IO::Pager::Unbuffered';
16 }
17  
18 # Gravy
19 sub import {
20 2 ▶ my ($self, %opt) = @_;
Subroutine import: called CC=2 SCAR=7.2
21 2 ▶ $SIG{PIPE} = 'IGNORE' if $opt{hush};
Branch: 1 branch
BranchTrueFalseTotal
if $opt{"hush"} 0 2 2
22 }
23  
24 2 local $_= "Badee badee badee that's all folks!";
25  
26 __END__
« Pager/Unbuffered.pm ↑ Summary