| 1 | # This code is part of Perl distribution HTML-FromMail version 4.00. | ||||||||||||
| 2 | # The POD got stripped from this file by OODoc version 3.05. | ||||||||||||
| 3 | # For contributors see file ChangeLog. | ||||||||||||
| 4 | |||||||||||||
| 5 | # This software is copyright (c) 2003-2025 by Mark Overmeer. | ||||||||||||
| 6 | |||||||||||||
| 7 | # This is free software; you can redistribute it and/or modify it under | ||||||||||||
| 8 | # the same terms as the Perl 5 programming language system itself. | ||||||||||||
| 9 | # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later | ||||||||||||
| 10 | |||||||||||||
| 11 | |||||||||||||
| 12 | package HTML::FromMail::Default::HTMLifiers;{ | ||||||||||||
| 13 | 1 | our $VERSION = '4.00'; | |||||||||||
| 14 | } | ||||||||||||
| 15 | |||||||||||||
| 16 | |||||||||||||
| 17 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 18 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 19 | |||||||||||||
| 20 | 1 | ▶ | use Log::Report 'html-frommail'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 21 | |||||||||||||
| 22 | 1 | ▶ | use HTML::FromText (); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 23 | |||||||||||||
| 24 | #-------------------- | ||||||||||||
| 25 | |||||||||||||
| 26 | 1 | our @htmlifiers = ( | |||||||||||
| 27 | 'text/plain' => \&htmlifyText, | ||||||||||||
| 28 | # 'text/html' => \&htmlifyHtml, | ||||||||||||
| 29 | ); | ||||||||||||
| 30 | |||||||||||||
| 31 | |||||||||||||
| 32 | sub htmlifyText($$$$) | ||||||||||||
| 33 | 0 | ▶ | { my ($page, $message, $part, $args) = @_; | ||||||||||
|
Subroutine
htmlifyText: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||
| 34 | 0 | ▶ | my $main = $args->{main} or panic; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 35 | 0 | ▶ | my $settings = $main->settings('HTML::FromText') | ||||||||||
|
Condition0%0/2
$main->settings('HTML::FromText') || {'pre', 1, 'urls', 1, 'email', 1, 'bold', 1, 'underline', 1}
MC/DC0%0/1
$main->settings('HTML::FromText') || {'pre', 1, 'urls', 1, 'email', 1, 'bold', 1, 'underline', 1}
$main->settings('HTML::FromText')
Truth table0%0/2
A
A= $main->settings('HTML::FromText')
| |||||||||||||
| 36 | || +{ pre => 1, urls => 1, email => 1, bold => 1, underline => 1}; | ||||||||||||
| 37 | |||||||||||||
| 38 | 0 | ▶ | my $f = HTML::FromText->new($settings) | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 39 | or panic "cannot create an HTML::FromText object"; | ||||||||||||
| 40 | |||||||||||||
| 41 | 0 | +{ image => '', # this is not an image | |||||||||||
| 42 | html => { text => $f->parse($part->decoded->string) }, | ||||||||||||
| 43 | }; | ||||||||||||
| 44 | } | ||||||||||||
| 45 | |||||||||||||
| 46 | |||||||||||||
| 47 | 1 | 1; | |||||||||||