| 1 | package XTaTIK::Common; | ||||||||||
| 2 | |||||||||||
| 3 | 3 | our $VERSION = '0.001002'; # VERSION | |||||||||
| 4 | |||||||||||
| 5 | 3 | require Exporter; | |||||||||
| 6 | 3 | @ISA = qw(Exporter); | |||||||||
| 7 | 3 | @EXPORT_OK = qw(n_to_br); | |||||||||
| 8 | |||||||||||
| 9 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 3 | ▶ | use HTML::Entities; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | sub n_to_br { | ||||||||||
| 14 | 0 | ▶ | my $data = shift; | ||||||||
|
Subroutine
n_to_br: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 15 | 0 | ▶ | return '' unless length $data; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 0 | return encode_entities($data) =~ s/\n\r?|\r\n/<br>/gr; | |||||||||
| 17 | } | ||||||||||