File Coverage

blib/lib/Lingua/YaTeA/Document.pm
Criterion Covered Total %
statement 14 24 58.3
branch n/a
condition n/a
subroutine 4 7 57.1
pod 5 5 100.0
total 23 36 63.8


line stmt bran cond sub pod time code
1             package Lingua::YaTeA::Document;
2 3     3   16 use strict;
  3         6  
  3         65  
3 3     3   13 use warnings;
  3         5  
  3         626  
4              
5             our $counter = 0;
6              
7             our $VERSION=$Lingua::YaTeA::VERSION;
8              
9             sub new
10             {
11 0     0 1 0 my ($class,$word) = @_;
12 0         0 my $this = {};
13 0         0 bless ($this,$class);
14 0         0 $this->{ID} = $counter;
15 0         0 $this->{NAME} = $word->getLexItem->getIF;
16 0         0 return $this;
17             }
18              
19             sub newDefault
20             {
21 3     3 1 7 my ($class,$word) = @_;
22 3         4 my $this = {};
23 3         6 bless ($this,$class);
24 3         11 $this->{ID} = 0;
25 3         6 $this->{NAME} = "no_name";
26 3         17 return $this;
27             }
28              
29             sub getID
30             {
31 660     660 1 771 my ($this) = @_;
32 660         1181 return $this->{ID};
33             }
34              
35             sub getName
36             {
37 0     0 1   my ($this) = @_;
38 0           return $this->{NAME};
39              
40             }
41              
42             sub update
43             {
44 0     0 1   my ($this,$word) = @_;
45 0           $this->{NAME} = $word->getLexItem->getIF;
46             }
47              
48             1;
49              
50             __END__