File Coverage

blib/lib/PlantUML/ClassDiagram/Class/Base.pm
Criterion Covered Total %
statement 17 25 68.0
branch n/a
condition 3 4 75.0
subroutine 7 10 70.0
pod 1 6 16.6
total 28 45 62.2


line stmt bran cond sub pod time code
1             package PlantUML::ClassDiagram::Class::Base;
2              
3 5     5   2315 use strict;
  5         11  
  5         144  
4 5     5   23 use warnings;
  5         5  
  5         130  
5 5     5   20 use utf8;
  5         6  
  5         25  
6              
7 5     5   132 use parent qw/Class::Accessor::Fast/;
  5         9  
  5         32  
8             __PACKAGE__->follow_best_practice;
9              
10             my @self_valiables = qw/
11             name
12             attribute
13             /;
14             __PACKAGE__->mk_ro_accessors(@self_valiables);
15              
16             sub new {
17 49     49 1 2883 my ($class, $name, $attribute) = @_;
18 49   50     219 my $attr = +{
      100        
19             name => $name || '',
20             attribute => $attribute || '',
21             };
22 49         134 return $class->SUPER::new($attr);
23             }
24              
25             sub build {
26 0     0 0 0 my ($class, $string) = @_;
27              
28 0         0 my $name = '';
29 0         0 my $attribute = '';
30              
31 0         0 return $class->new($name, $attribute);
32             }
33              
34 14     14 0 29 sub is_variable { 0 }
35 20     20 0 41 sub is_method { 0 }
36              
37             sub is_static {
38 0     0 0   my ($self) = @_;
39 0           return 0;
40             }
41              
42             sub is_abstract {
43 0     0 0   my ($self) = @_;
44 0           return 0;
45             }
46              
47             1;