File Coverage

blib/lib/Lingua/YaTeA/MonolexicalUnit.pm
Criterion Covered Total %
statement 29 33 87.8
branch 1 4 25.0
condition 0 3 0.0
subroutine 8 9 88.8
pod 2 2 100.0
total 40 51 78.4


line stmt bran cond sub pod time code
1             package Lingua::YaTeA::MonolexicalUnit;
2 5     5   28 use strict;
  5         10  
  5         123  
3 5     5   22 use warnings;
  5         8  
  5         100  
4 5     5   21 use NEXT;
  5         8  
  5         25  
5 5     5   102 use Data::Dumper;
  5         8  
  5         213  
6 5     5   33 use UNIVERSAL;
  5         9  
  5         30  
7 5     5   145 use Scalar::Util qw(blessed);
  5         8  
  5         211  
8 5     5   42 use Lingua::YaTeA::MonolexicalPhrase;
  5         9  
  5         43  
9              
10             our $VERSION=$Lingua::YaTeA::VERSION;
11              
12             sub new
13             {
14 42     42 1 3844 my ($class_or_object,$num_content_words,$words_a) = @_;
15 42         62 my $this = shift;
16 42 50       88 $this = bless {}, $this unless ref $this;
17 42         71 $this->{CONTENT_WORDS} = $num_content_words;
18 42         64 $this->{PARSING_METHOD} = ();
19 42         75 $this->{LENGTH} = scalar @$words_a;
20 42         199 $this->NEXT::new(@_);
21 42         3680 return $this;
22             }
23              
24             sub setParsingMethod
25             {
26 0     0 1   my ($this,$method) = @_;
27 0 0 0       if ((blessed($this)) && ($this->isa('Lingua::YaTeA::Phrase')))
28             {
29 0           $Lingua::YaTeA::MonolexicalPhrase::parsed++;
30             }
31 0           $this->{PARSING_METHOD} = $method;
32             }
33              
34             1;
35              
36              
37             __END__