ZofCMS/Plugin/Doctypes.pm

filter: Statementstmt 22.2% 8 / 36 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 2 totaltotal 20.0% 10 / 50 CC 4 SCAR 24.8
CC
4
Cov
19%
process
20.0
new
2.0
BEGIN
1.0
CRAP 12.0
« ZofCMS/Plugin/FileToTemplate.pm ↑ Summary ZofCMS/Plugin/LinksToSpecs/CSS.pm »
1 package App::ZofCMS::Plugin::Doctypes;
2  
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION = '1.001010'; # VERSION
7  
8 0 ▶sub new { bless {}, shift }
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
9  
10 0 ▶sub process {
Subroutine process: not called CC=4 SCAR=30.0
Pod undocumented
11 0 my ( $self, $template, $query, $config ) = @_;
12  
13 my %conf = (
14 0 ▶ %{ delete $config->conf->{plugin_doctype} || {} },
Condition0%0/2
delete $config->conf->{'plugin_doctype'} || {}
l!l
00
MC/DC0%0/1
delete $config->conf->{'plugin_doctype'} || {}
delete $config->conf->{'plugin_doctype'}
Truth table0%0/2
A
A= delete $config->conf->{'plugin_doctype'}
Aresult
11
00
15 0 ▶ %{ delete $template->{plugin_doctype} || {} },
Condition0%0/2
delete $template->{'plugin_doctype'} || {}
l!l
00
MC/DC0%0/1
delete $template->{'plugin_doctype'} || {}
delete $template->{'plugin_doctype'}
Truth table0%0/2
A
A= delete $template->{'plugin_doctype'}
Aresult
11
00
16 );
17  
18 0 my $t = $template->{t};
19  
20 0 $t->{'doctype HTML 4.01 Strict'}
21 = q|<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" |
22 . q|"http://www.w3.org/TR/html4/strict.dtd">|;
23  
24 0 $t->{'doctype HTML 4.01 Transitional'}
25 = q|<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
26 . q|"http://www.w3.org/TR/html4/loose.dtd">|;
27  
28 0 $t->{'doctype HTML 4.01 Frameset'}
29 = q|<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" |
30 . q|"http://www.w3.org/TR/html4/frameset.dtd">|;
31  
32 0 $t->{'doctype XHTML 1.0 Strict'}
33 = q|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
34 . q|"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">|;
35  
36 0 $t->{'doctype XHTML 1.0 Transitional'}
37 = q|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
38 . q|"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">|;
39  
40 0 $t->{'doctype XHTML 1.0 Frameset'}
41 = q|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" |
42 . q|"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">|;
43  
44 0 $t->{'doctype XHTML 1.1'}
45 = q|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
46 . q|"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">|;
47  
48 0 $t->{'doctype HTML5'}
49 = q|<!DOCTYPE html>|;
50  
51 return 1
52 0 ▶ unless $conf{extra};
Branch: 1 branch
BranchTrueFalseTotal
unless $conf{"extra"} 0 0 0
53  
54 0 $t->{'doctype XHTML Basic 1.0'}
55 = q|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" |
56 . q|"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">|;
57  
58 0 $t->{'doctype XHTML Basic 1.1'}
59 = q|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" |
60 . q|"http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">|;
61  
62 0 $t->{'doctype HTML 2.0'}
63 = q|<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">|;
64  
65 0 $t->{'doctype HTML 3.2'}
66 = q|<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">|;
67  
68 0 $t->{'doctype MathML 1.01'}
69 = q|<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">|;
70  
71 0 $t->{'doctype MathML 2.0'}
72 = q|<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" |
73 . q|"http://www.w3.org/TR/MathML2/dtd/mathml2.dtd">|;
74  
75 0 $t->{'doctype XHTML + MathML + SVG'}
76 = q|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" |
77 . q|"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">|;
78  
79 0 $t->{'doctype SVG 1.0'}
80 = q|<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" |
81 . q|"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">|;
82  
83 0 $t->{'doctype SVG 1.1 Full'}
84 = q|<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" |
85 . q|"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">|;
86  
87 0 $t->{'doctype SVG 1.1 Basic'}
88 = q|<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" |
89 . q|"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">|;
90  
91 0 $t->{'doctype SVG 1.1 Tiny'}
92 = q|<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" |
93 . q|"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">|;
94  
95 0 $t->{'doctype XHTML + MathML + SVG Profile (XHTML as the host language)'}
96 = q|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" |
97 . q|"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">|;
98  
99 0 $t->{'doctype XHTML + MathML + SVG Profile (Using SVG as the host)'}
100 = q|<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" |
101 . q|"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">|;
102 }
103  
104 1 1;
105 __END__
« ZofCMS/Plugin/FileToTemplate.pm ↑ Summary ZofCMS/Plugin/LinksToSpecs/CSS.pm »