File Coverage

blib/lib/BBCode/Tag/Block.pm
Criterion Covered Total %
statement 15 16 93.7
branch 1 2 50.0
condition n/a
subroutine 6 6 100.0
pod 3 3 100.0
total 25 27 92.5


line stmt bran cond sub pod time code
1             # $Id: Block.pm 284 2006-12-01 07:51:49Z chronos $
2             package BBCode::Tag::Block;
3 6     6   33 use base qw(BBCode::Tag);
  6         13  
  6         385  
4 6     6   33 use strict;
  6         12  
  6         181  
5 6     6   32 use warnings;
  6         13  
  6         1187  
6             our $VERSION = '0.34';
7              
8             sub Class($):method {
9 14     14 1 43 return qw(BLOCK);
10             }
11              
12             sub BodyTags($):method {
13 8     8 1 32 return qw(:BLOCK :INLINE);
14             }
15              
16             sub bodyHTML($):method {
17 51     51 1 254 local $_ = shift->SUPER::bodyHTML();
18 51         4843 s#^\s* (?:
\s* )* ##x;
19 51         1023 s# \s* (?:
\s* )* $##x;
20 51 50       425 return $_ unless wantarray;
21 0           return split /(?<=\n)/, $_;
22             }
23              
24             1;