ZofCMS/Plugin/ValidationLinks.pm

filter: Statementstmt 50.0% 8 / 16 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 33.3% 10 / 30 CC 4 SCAR 24.8
CC
4
Cov
36%
process
20.0
new
2.0
BEGIN
1.0
CRAP 12.0
« ZofCMS/Plugin/LinksToSpecs/CSS.pm ↑ Summary ZofCMS/Plugin/AutoEmptyQueryDelete.pm »
1 package App::ZofCMS::Plugin::ValidationLinks;
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 {}, }
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 html_text => 'Valid HTML 4.01 Strict',
15 css_text => 'Valid CSS',
16 xhtml => 0,
17 0 ▶ %{ delete $config->conf->{plug_val_links} || {} },
Condition0%0/2
delete $config->conf->{'plug_val_links'} || {}
l!l
00
MC/DC0%0/1
delete $config->conf->{'plug_val_links'} || {}
delete $config->conf->{'plug_val_links'}
Truth table0%0/2
A
A= delete $config->conf->{'plug_val_links'}
Aresult
11
00
18 0 ▶ %{ delete $template->{plug_val_links} || {} },
Condition0%0/2
delete $template->{'plug_val_links'} || {}
l!l
00
MC/DC0%0/1
delete $template->{'plug_val_links'} || {}
delete $template->{'plug_val_links'}
Truth table0%0/2
A
A= delete $template->{'plug_val_links'}
Aresult
11
00
19 );
20  
21 0 ▶ my $code = $conf{xhtml} ? 'XHTML' : 'HTML';
Branch: 1 branch
BranchTrueFalseTotal
$conf{'xhtml'} ? : 0 0 0
22  
23 0 $template->{t}{val_link_html} = qq|<a href="http://validator.w3.org/check?uri=referer"|
24 . qq| title="Validate $code code on this page">$conf{html_text}</a>|;
25  
26 $template->{t}{val_link_css} =
27 0 qq|<a href="http://jigsaw.w3.org/css-validator/check/referer"|
28 . qq| title="Validate CSS code on this page">$conf{css_text}</a>|;
29 }
30  
31 1 1;
32 __END__
« ZofCMS/Plugin/LinksToSpecs/CSS.pm ↑ Summary ZofCMS/Plugin/AutoEmptyQueryDelete.pm »