File Coverage

blib/lib/Lingua/YaTeA/ForbiddenStructure.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 2 3 66.6
total 24 25 96.0


line stmt bran cond sub pod time code
1             package Lingua::YaTeA::ForbiddenStructure;
2 5     5   25 use strict;
  5         9  
  5         112  
3 5     5   21 use warnings;
  5         8  
  5         816  
4              
5             our $VERSION=$Lingua::YaTeA::VERSION;
6              
7             sub new
8             {
9 200     200 1 308 my ($class,$form) = @_;
10 200         275 my $this = {};
11 200         279 bless ($this,$class);
12 200         369 $this->{FORM} = $form;
13 200         328 $this->{LENGTH} = $this->setLength($form);
14 200         347 return $this;
15             }
16              
17             sub setLength
18             {
19 200     200 1 279 my ($this,$form) = @_;
20 200         357 my @words = split (/ /,$form);
21 200         376 return scalar @words;
22             }
23              
24             sub getLength
25             {
26 214     214 0 280 my ($this) = @_;
27 214         468 return $this->{LENGTH};
28             }
29             1;
30              
31             __END__