Wiki/Plugin/Block/UL.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/OL.pm ↑ Summary Wiki/Plugin/Function/AName.pm »
1 package Text::Livedoor::Wiki::Plugin::Block::UL;
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 95 ▶sub check {
Subroutine check: called CC=3 SCAR=11.0
Pod documented
8 95 my $self = shift;
9 95 my $line = shift;
10 95 my $args = shift;
11 95 my $on_next = $args->{on_next};
12 95 my $id = $args->{id};
13  
14 95 ▶ if( my( $mark ) = $line =~ /^(-{1,3})[^-]/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my($mark) = $line =~ /^(-{1,3})[^-]/) 12 83 95
15 12 my $level = length $mark ;
16 12 ▶ unless ( $on_next ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($on_next) 7 5 12
17 7 $line =~ s/^-{$level}//;
18 }
19 12 return { id => $id , level => $level , line => $line };
20 }
21 83 return;
22 }
23  
24 2 ▶sub get {
Subroutine get: called CC=1 SCAR=0.0
Pod documented
25 2 my $self = shift;
26 2 my $block = shift;
27 2 my $inline = shift;
28 2 my $items = shift;
29 2 $self->list($inline, $items,'ul');
30 }
31  
32 5 1;
33  
34 =head1 NAME
35  
36 Text::Livedoor::Wiki::Plugin::Block::UL - UL Block Plugin
37  
38 =head1 DESCRIPTION
39  
40 unordered list
41  
42 =head1 SYNOPSIS
43  
44 o hoge
45 -- hogehoge
46 --- hy mom
47 - hoge
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/OL.pm ↑ Summary Wiki/Plugin/Function/AName.pm »