HTTPServer/CaptureSTDOUT.pm

filter: Statementstmt 11.1% 1 / 9 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 6.6% 1 / 15 CC 2 SCAR 12.8
CC
2
Cov
9%
READLINE
6.0
TIEHANDLE
2.0
PRINT
2.0
CRAP 3.6
« HTTPServer/Request.pm ↑ Summary HTTPServer/Session.pm »
1 ##############################################################################
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Library General Public
5 # License as published by the Free Software Foundation; either
6 # version 2 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Library General Public License for more details.
12 #
13 # You should have received a copy of the GNU Library General Public
14 # License along with this library; if not, write to the
15 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 # Boston, MA 02111-1307, USA.
17 #
18 # Copyright (C) 2003-2005 Ryan Eatmon
19 #
20 ##############################################################################
21  
22 #
23 # This class was borrowed from the IO::Capture module by Mark Reynolds and
24 # Jon Morgan. I do not need all the capability of IO::Capture, nor do I
25 # want to create a depenency on too many external modules. Thanks to Mark
26 # and Jon for the great work.
27 #
28  
29 package Net::HTTPServer::CaptureSTDOUT;
30  
31 0 ▶sub TIEHANDLE {
Subroutine TIEHANDLE: not called CC=1 SCAR=6.9
32 0 my $class = shift;
33 0 bless [], $class;
34 }
35  
36 0 ▶sub PRINT {
Subroutine PRINT: not called CC=1 SCAR=6.9
37 0 my $self = shift;
38 0 push @$self, join '',@_;
39 }
40  
41 0 ▶sub READLINE {
Subroutine READLINE: not called CC=2 SCAR=17.9
42 0 my $self = shift;
43 0 ▶ return wantarray ? @$self : shift @$self;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
44 }
45  
46 0 ▶sub CLOSE {
Subroutine CLOSE: not called CC=1 SCAR=6.9
47 0 my $self = shift;
48 0 return close $self;
49 }
50  
51 5 1;
52  
« HTTPServer/Request.pm ↑ Summary HTTPServer/Session.pm »