Tag/HIDDEN.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 32 CC 2 SCAR 11.5
CC
2
Cov
0%
toHTML
6.0
BodyPermitted
2.0
BEGIN
2.0
CRAP 3.1
1 # $Id: HIDDEN.pm 284 2006-12-01 07:51:49Z chronos $
2 package BBCode::Tag::HIDDEN;
3 use base qw(BBCode::Tag::Inline);
4 use BBCode::Util qw(multilineText);
5 use strict;
6 use warnings;
7 our $VERSION = '0.34';
8  
9 sub BodyPermitted($):method {
10 return 1;
11 }
12  
13 sub toHTML($):method {
14 my $this = shift;
15 my $pfx = $this->parser->css_prefix;
16 my $css = $this->parser->css_direct_styles ? qq( style="color:#ddd;background-color:#ddd") : "";
17  
18 my $ret = qq(<span class="${pfx}hidden" title="Hidden text"$css>);
19 foreach($this->body) {
20 $ret .= $_->toHTML;
21 }
22 $ret .= '</span>';
23 return multilineText $ret;
24 }
25  
26 1;
27