Wiki/Plugin/Inline/Footnote.pm

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 29 / 29 CC 2 SCAR 3.4
CC
2
Cov
100%
process
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« Wiki/Plugin/Inline/URL.pm ↑ Summary Wiki/Plugin/Block/CommentOut.pm »
1 package Text::Livedoor::Wiki::Plugin::Inline::Footnote;
2  
3 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 10 ▶use base qw(Text::Livedoor::Wiki::Plugin::Inline);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 10 __PACKAGE__->regex(q{\(\(((?:(?<!\)\)).)*)\)\)});
8 10 __PACKAGE__->n_args(1);
9  
10 6 ▶sub process {
Subroutine process: called CC=2 SCAR=6.9
Pod documented
11 6 my ( $class , $inline , $line ) = @_;
12 6 $line = $inline->parse($line);
13 6 my $scratchpad = $Text::Livedoor::Wiki::scratchpad ;
14 6 ▶ $scratchpad->{footnotes} ||= [];
Condition100%2/2
$scratchpad->{"footnotes"} ||= []
l!l
24
MC/DC100%1/1
$scratchpad->{"footnotes"} ||= []
$scratchpad->{"footnotes"}
Truth table100%2/2
A
A= $scratchpad->{"footnotes"}
Aresult
11
00
15 6 push @{$scratchpad->{footnotes}},$line;
16 6 my $cnt = scalar @{$scratchpad->{footnotes}};
17 6 return qq|<a href="#footer-footnote$cnt" name="footnote$cnt">*$cnt</a>|;
18 }
19  
20 10 1;
21  
22 =head1 NAME
23  
24 Text::Livedoor::Wiki::Plugin::Inline::Footnote Footnote Inline Plugin
25  
26 =head1 DESCRIPTION
27  
28 This plugin is implement with really bad manner. Anyway, with this plugin , you can use footnote.
29  
30 =head1 SYNOPSIS
31  
32 ((polocky is a charactor for livedoor wiki))polocky is...
33  
34 =head1 FUNCTION
35  
36 =head2 process
37  
38 =head1 AUTHOR
39  
40 polocky
41  
42 =cut
« Wiki/Plugin/Inline/URL.pm ↑ Summary Wiki/Plugin/Block/CommentOut.pm »