ASP4/OutBuffer.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 30 CC 2 SCAR 11.0
CC
2
Cov
0%
add
6.0
new
2.0
data
2.0
CRAP 3.0
1  
2 package ASP4::OutBuffer;
3  
4 use strict;
5 use warnings 'all';
6  
7  
8 sub new {
9 return bless { data => '' }, shift;
10 }
11  
12 sub add {
13 my ($s, $str) = @_;
14 return unless defined($str);
15 $s->{data} .= $str;
16 return;
17 }
18 sub data { shift->{data} }
19 sub clear {shift->{data} = '' }
20  
21 sub DESTROY {
22 my $s = shift;
23 delete($s->{data});
24 undef(%$s);
25 }
26  
27 1;# return true:
28