| 1 | # $Id: U.pm 284 2006-12-01 07:51:49Z chronos $ | ||||||||||
| 2 | package BBCode::Tag::U; | ||||||||||
| 3 | 1 | ▶ | use base qw(BBCode::Tag::Inline); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use BBCode::Util qw(multilineText); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | our $VERSION = '0.34'; | |||||||||
| 8 | |||||||||||
| 9 | 4 | ▶ | sub BodyPermitted($):method { | ||||||||
|
Subroutine
BodyPermitted: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 10 | 4 | return 1; | |||||||||
| 11 | } | ||||||||||
| 12 | |||||||||||
| 13 | 1 | ▶ | sub toHTML($):method { | ||||||||
|
Subroutine
toHTML: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 14 | 1 | my $this = shift; | |||||||||
| 15 | 1 | my $pfx = $this->parser->css_prefix; | |||||||||
| 16 | 1 | ▶ | my $css = $this->parser->css_direct_styles ? qq( style="text-decoration: underline") : ""; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | |||||||||||
| 18 | 1 | my $ret = qq(<span class="${pfx}u"$css>); | |||||||||
| 19 | 1 | $ret .= $this->bodyHTML; | |||||||||
| 20 | 1 | $ret .= '</span>'; | |||||||||
| 21 | 1 | return multilineText $ret; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 0 | ▶ | sub toText($):method { | ||||||||
|
Subroutine
toText: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 25 | 0 | return multilineText '_'.shift->bodyText().'_'; | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 1 | 1; | |||||||||