blib/lib/PerlIO/via/escape_ansi.pm

filter: Statementstmt 100% 33 / 33 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 2 totaltotal 95.7% 45 / 47 CC 3 SCAR 3.4
CC
3
Cov
100%
import
2.0
FILL
2.0
BEGIN
1.0
CRAP 1.4
↑ Summary escape_chars.c »
1 package PerlIO::via::escape_ansi;
2  
3 3 require 5.008;
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use XSLoader;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 {
10 3 ▶ no strict "vars";
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 $VERSION = "0.01";
12 3 XSLoader::load(__PACKAGE__, $VERSION);
13 }
14  
15  
16 3 ▶sub import {
Subroutine import: called CC=2 SCAR=6.9
17 3 my ($class, @args) = @_;
18  
19 3 ▶ if (grep { $_ eq "-as_function" } @args) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep {$_ eq "-as_function";} @args) 1 2 3
20 3 ▶ no strict "vars";
Subroutine BEGIN: called CC=1 SCAR=0.0
21 1 require Exporter;
22 1 @ISA = qw< Exporter >;
23 1 @EXPORT = qw< escape_non_printable_chars >;
24 1 $class->export_to_level(1);
25 }
26 }
27  
28  
29 #
30 # PerlIO methods
31 # --------------
32  
33 3 ▶sub PUSHED {
Subroutine PUSHED: called CC=1 SCAR=0.0
Pod undocumented
34 3 my ($class, $mode) = @_;
35 3 return bless {}, $class;
36 }
37  
38 6 ▶sub FILL {
Subroutine FILL: called CC=2 SCAR=6.9
Pod undocumented
39 6 my ($self, $fh) = @_;
40 6 my $line = <$fh>;
41 6 ▶ return undef unless defined $line;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $line 3 3 6
42 3 return escape_non_printable_chars ($line);
43 }
44  
45  
46 3 "true value on strike"
47  
48 __END__
↑ Summary escape_chars.c »