| 1 | package Text::Markup::HTML; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use 5.8.1; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use Text::Markup; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | our $VERSION = '0.43'; | |||||||||
| 9 | |||||||||||
| 10 | 3 | ▶ | sub import { | ||||||||
|
Subroutine
import: called CC=2 SCAR=6.9
| |||||||||||
| 11 | # Replace the regex if passed one. | ||||||||||
| 12 | 3 | ▶ | Text::Markup->register( html => $_[1] ) if $_[1]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | } | ||||||||||
| 14 | |||||||||||
| 15 | 2 | ▶ | sub parser { | ||||||||
|
Subroutine
parser: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 16 | 2 | my ($file, $encoding, $opts) = @_; | |||||||||
| 17 | 2 | my $html = do { | |||||||||
| 18 | 2 | ▶ | open my $fh, '<:raw', $file or die "Cannot open $file: $!\n"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 2 | local $/; | |||||||||
| 20 | 2 | <$fh>; | |||||||||
| 21 | }; | ||||||||||
| 22 | 2 | ▶ | return $html =~ /\S/ ? $html : undef | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 1 | 1; | |||||||||
| 26 | __END__ | ||||||||||