| 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::Object;{ | ||||||||||||||||||||
| 13 | 1 | our $VERSION = '4.00'; | |||||||||||||||||||
| 14 | } | ||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 1 | ▶ | use base 'Mail::Reporter'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 1 | ▶ | use Log::Report 'html-frommail'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | #-------------------- | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | sub init($) | ||||||||||||||||||||
| 26 | 0 | ▶ | { my ($self, $args) = @_; | ||||||||||||||||||
|
Subroutine
init: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 27 | 0 | $self->SUPER::init($args); | |||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 0 | ▶ | $self->{HFO_topic} = $args->{topic} // panic "No topic"; | ||||||||||||||||||
|
Condition0%0/3
$args->{"topic"} // &panic("No topic")
MC/DC0%0/2
$args->{"topic"} // &panic("No topic")
$args->{"topic"}
&panic("No topic")
Truth table0%0/3
A // B
A= $args->{"topic"}B= &panic("No topic")
| |||||||||||||||||||||
| 30 | 0 | ▶ | $self->{HFO_settings} = $args->{settings} || {}; | ||||||||||||||||||
|
Condition0%0/2
$args->{'settings'} || {}
MC/DC0%0/1
$args->{'settings'} || {}
$args->{'settings'}
Truth table0%0/2
A
A= $args->{'settings'}
| |||||||||||||||||||||
| 31 | 0 | $self; | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | #-------------------- | ||||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | 0 | ▶ | sub topic() { $_[0]->{HFO_topic} } | ||||||||||||||||||
|
Subroutine
topic: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | sub settings(;$) | ||||||||||||||||||||
| 40 | 0 | ▶ | { my $self = shift; | ||||||||||||||||||
|
Subroutine
settings: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||
| 41 | 0 | ▶ | my $topic = @_ ? shift : $self->topic; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 42 | 0 | ▶ | defined $topic or return {}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 43 | 0 | ▶ | $self->{HFO_settings}{$topic} || {}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 44 | } | ||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | #-------------------- | ||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | sub plain2html($) | ||||||||||||||||||||
| 49 | 0 | ▶ | { my $self = shift; | ||||||||||||||||||
|
Subroutine
plain2html: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 50 | 0 | my $string = join '', @_; | |||||||||||||||||||
| 51 | 0 | for($string) | |||||||||||||||||||
| 52 | 0 | { s/\&/\&/g; | |||||||||||||||||||
| 53 | 0 | s/\</\</g; | |||||||||||||||||||
| 54 | 0 | s/\>/\>/g; | |||||||||||||||||||
| 55 | 0 | s/"/\"/g; | |||||||||||||||||||
| 56 | } | ||||||||||||||||||||
| 57 | 0 | $string; | |||||||||||||||||||
| 58 | } | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | 1 | 1; | |||||||||||||||||||