Parser/Text.pm

filter: Statementstmt 89.6% 26 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 76.9% 10 / 13 Podpod 100% 6 / 6 totaltotal 87.5% 42 / 48 CC 1 SCAR 2.1
CC
1
Cov
90%
append
2.0
as_pod
2.0
as_string
2.0
CRAP 1.2
« Parser/FootnoteReference.pm ↑ Summary
1 ##----------------------------------------------------------------------------
2 ## Markdown Parser Only - ~/lib/Markdown/Parser/Text.pm
3 ## Version v0.3.0
4 ## Copyright(c) 2022 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2021/08/23
7 ## Modified 2024/08/30
8 ## All rights reserved
9 ##
10 ## This program is free software; you can redistribute it and/or modify it
11 ## under the same terms as Perl itself.
12 ##----------------------------------------------------------------------------
13 package Markdown::Parser::Text;
14 BEGIN
15 2 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
16 2 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 2 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶ use parent qw( Markdown::Parser::Element );
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
20 2 our $VERSION = 'v0.3.0';
21 };
22  
23 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 sub init
27 12 ▶{
Subroutine init: called CC=1 SCAR=0.0
Pod documented
28 12 my $self = shift( @_ );
29 12 $self->{text} = '';
30 12 $self->{tag_name} = 'text';
31 12 return( $self->SUPER::init( @_ ) );
32 }
33  
34 0 ▶sub append { return( shift->text->append( @_ ) ); }
Subroutine append: not called CC=1 SCAR=6.9
Pod documented
35  
36 12 ▶sub as_markdown { return( shift->text->scalar ); }
Subroutine as_markdown: called CC=1 SCAR=0.0
Pod documented
37  
38 0 ▶sub as_pod { return( shift->text->scalar ); }
Subroutine as_pod: not called CC=1 SCAR=6.9
Pod documented
39  
40 0 ▶sub as_string { return( shift->text->scalar ); }
Subroutine as_string: not called CC=1 SCAR=6.9
Pod documented
41  
42 26 ▶sub text { return( shift->_set_get_scalar_as_object( 'text', @_ ) ); }
Subroutine text: called CC=1 SCAR=0.0
Pod documented
43  
44 2 1;
45 # NOTE: POD
46 __END__
« Parser/FootnoteReference.pm ↑ Summary