Builder/Scalar.pm

filter: Statementstmt 100% 7 / 7 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 5 / 5 totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
new
1.0
is_scalar
1.0
is_substantial
1.0
CRAP 1.0
« Builder/Data.pm ↑ Summary
1 package Lang::Tree::Builder::Scalar;
2  
3 =head1 NAME
4  
5 Lang::Tree::Builder::Scalar - simple class representing a scalar.
6  
7 =head1 SYNOPSIS
8  
9 my $scalar = new Lang::Tree::Builder::Scalar();
10 $scalar->is_scalar == 1; # true
11 $scalar->name eq 'scalar'; # true
12 $scalar->lastpart eq 'scalar'; # true
13  
14 This class is polymorphic with C<Lang::Tree::Builder::Class> and represents a
15 simple scalar in a way that is convenient for the templates.
16  
17 =head2 new
18  
19 Creates a new instance of a scalar. This is called via
20 C<Lang::Tree::Builder::Class::new> and so is effectively a singleton.
21  
22 =cut
23  
24 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
25 2 my ($class) = @_;
26 2 bless {}, $class;
27 }
28  
29 =head2 is_scalar
30  
31 Returns true.
32  
33 =cut
34  
35 1 ▶sub is_scalar { 1 }
Subroutine is_scalar: called CC=1 SCAR=0.0
Pod documented
36  
37 =head2 is_substantial
38  
39 Returns false.
40  
41 =cut
42  
43 1 ▶sub is_substantial { 0 }
Subroutine is_substantial: called CC=1 SCAR=0.0
Pod documented
44  
45 =head2 name
46  
47 Returns C<scalar>.
48  
49 =cut
50  
51 2 ▶sub name { 'scalar' }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
52  
53 =head2 lastpart
54  
55 Returns C<scalar>.
56  
57 =cut
58  
59 1 ▶sub lastpart { 'scalar' }
Subroutine lastpart: called CC=1 SCAR=0.0
Pod documented
60  
61 7 1;
« Builder/Data.pm ↑ Summary