| 1 | # $Id: Block.pm 284 2006-12-01 07:51:49Z chronos $ | ||||||||||
| 2 | package BBCode::Tag::Block; | ||||||||||
| 3 | 6 | ▶ | use base qw(BBCode::Tag); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 6 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 6 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 6 | our $VERSION = '0.34'; | |||||||||
| 7 | |||||||||||
| 8 | 14 | ▶ | sub Class($):method { | ||||||||
|
Subroutine
Class: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 9 | 14 | return qw(BLOCK); | |||||||||
| 10 | } | ||||||||||
| 11 | |||||||||||
| 12 | 8 | ▶ | sub BodyTags($):method { | ||||||||
|
Subroutine
BodyTags: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 13 | 8 | return qw(:BLOCK :INLINE); | |||||||||
| 14 | } | ||||||||||
| 15 | |||||||||||
| 16 | 51 | ▶ | sub bodyHTML($):method { | ||||||||
|
Subroutine
bodyHTML: called CC=2 SCAR=7.4
Pod
documented
| |||||||||||
| 17 | 51 | local $_ = shift->SUPER::bodyHTML(); | |||||||||
| 18 | 51 | s#^\s* (?: <br/> \s* )* ##x; | |||||||||
| 19 | 51 | s# \s* (?: <br/> \s* )* $##x; | |||||||||
| 20 | 51 | ▶ | return $_ unless wantarray; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 0 | return split /(?<=\n)/, $_; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 6 | 1; | |||||||||