Wiki/Plugin/Block/OL.pm

filter: Statementstmt 100% 26 / 26 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 100% 37 / 37 CC 3 SCAR 6.2
CC
3
Cov
100%
check
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« Wiki/Plugin/Block/Pre.pm ↑ Summary Wiki/Plugin/Block/UL.pm »
1 package Text::Livedoor::Wiki::Plugin::Block::OL;
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::Base::Block::List);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 146 ▶sub check {
Subroutine check: called CC=3 SCAR=11.0
Pod documented
8 146 my $self = shift;
9 146 my $line = shift;
10 146 my $args = shift;
11 146 my $on_next = $args->{on_next};
12 146 my $id = $args->{id};
13  
14 146 ▶ if( my( $mark ) = $line =~ /^(\+{1,3})[^\+]/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my($mark) = $line =~ /^(\+{1,3})[^\+]/) 9 137 146
15 9 my $level = length $mark ;
16 9 ▶ unless ( $on_next ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($on_next) 5 4 9
17 5 $line =~ s/^\+{$level}//;
18 }
19 9 return { id => $id , level => $level , line => $line };
20 }
21 137 return;
22 }
23  
24 1 ▶sub get {
Subroutine get: called CC=1 SCAR=0.0
Pod documented
25 1 my $self = shift;
26 1 my $block = shift;
27 1 my $inline = shift;
28 1 my $items = shift;
29 1 $self->list( $inline , $items,'ol');
30 }
31  
32 5 1;
33  
34 =head1 NAME
35  
36 Text::Livedoor::Wiki::Plugin::Block::OL - OL Block Plugin
37  
38 =head1 SYNOPSIS
39  
40 + hoge
41 ++ hogehoge
42 +++ hy mom
43 + hoge
44  
45 =head1 DESCRIPTION
46  
47 create <ol> surrounded list. till 3 level.
48  
49 =head1 FUNCTION
50  
51 =head2 check
52  
53 =head2 get
54  
55 =head1 AUTHOR
56  
57 polocky
58  
59 =cut
« Wiki/Plugin/Block/Pre.pm ↑ Summary Wiki/Plugin/Block/UL.pm »