blib/lib/PerlIO/win32console.pm

filter: Statementstmt 90.9% 20 / 22 Branchbran 50.0% 5 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 81.0% 30 / 37 CC 6 SCAR 16.6
CC
6
Cov
78%
import
8.1
BEGIN
1.0
BEGIN
1.0
CRAP 5.3
↑ Summary win32console.c »
1 package PerlIO::win32console;
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 2 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = "0.001";
7  
8 2 ▶use XSLoader;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 XSLoader::load(__PACKAGE__, __PACKAGE__->VERSION);
10  
11 4 ▶sub import {
Subroutine import: called CC=6 SCAR=20.9
12 # only something to do on windows
13 4 my ($class, @args) = @_;
14 4 ▶ while (@args) {
Branch: 1 branch
BranchTrueFalseTotal
if (@args) 2 3 5
15 2 my $arg = shift @args;
16 2 ▶ if ($arg eq "-installout") {
Branch: 1 branch
BranchTrueFalseTotal
if ($arg eq '-installout') { } 1 1 2
17 1 ▶ if ($^O eq "MSWin32") {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O eq "MSWin32") 0 1 1
18 0 ▶ binmode STDOUT, ":raw:win32console" if -t STDOUT;
Branch: 1 branch
BranchTrueFalseTotal
if -t STDOUT 0 0 0
19 0 ▶ binmode STDERR, ":raw:win32console" if -t STDERR;
Branch: 1 branch
BranchTrueFalseTotal
if -t STDERR 0 0 0
20 }
21 }
22 else {
23 1 Carp::croak("$class: unknown import $arg");
24 }
25 }
26 }
27  
28 __END__
↑ Summary win32console.c »