Wiki/Plugin/Block/Line.pm

filter: Statementstmt 100% 27 / 27 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 100% 36 / 36 CC 3 SCAR 4.5
CC
3
Cov
100%
check
2.0
get
2.0
BEGIN
1.0
CRAP 1.6
« Wiki/Function.pm ↑ Summary Wiki/Plugin/Block/DL.pm »
1 package Text::Livedoor::Wiki::Plugin::Block::Line;
2  
3 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use base qw(Text::Livedoor::Wiki::Plugin::Block);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 143 ▶sub check {
Subroutine check: called CC=2 SCAR=6.9
Pod documented
8 143 my $class = shift;
9 143 my $line = shift;
10 143 my $args = shift;
11 143 my $id = $args->{id};
12 143 my $on_next = $args->{on_next};
13 143 ▶ if( $line =~ /^----/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($line =~ /^----/) 5 138 143
14 #XXX
15 5 $Text::Livedoor::Wiki::scratchpad->{skip_ajust_block_break} = '1';
16
17 5 $line =~ s/^----//;
18 5 return { line => $line };
19 }
20 138 return;
21 }
22  
23 3 ▶sub get {
Subroutine get: called CC=2 SCAR=6.9
Pod documented
24 3 my $class = shift;
25 3 my $block = shift;
26 3 my $inline = shift;
27 3 my $items = shift;
28 3 my $text = '';
29 3 $text .= qq|<hr size="1" noshade="noshade" />| . $inline->parse($_->{line}) . "\n" for @$items;
30 3 return $text;
31 }
32  
33 5 1;
34  
35 =head1 NAME
36  
37 Text::Livedoor::Wiki::Plugin::Block::Line - Block Line Plugin
38  
39 =head1 DESCRIPTION
40  
41 let's have a line.
42  
43 =head1 SYNOPSIS
44  
45 ----
46 ---- line
47  
48 =head1 FUNCTION
49  
50 =head2 check
51  
52 =head2 get
53  
54 =head1 AUTHOR
55  
56 polocky
57  
58 =cut
« Wiki/Function.pm ↑ Summary Wiki/Plugin/Block/DL.pm »