File Coverage

blib/lib/Lingua/AR/Word.pm
Criterion Covered Total %
statement 23 23 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod 0 4 0.0
total 32 36 88.8


line stmt bran cond sub pod time code
1             package Lingua::AR::Word;
2              
3 1     1   29916 use strict;
  1         2  
  1         318  
4 1     1   7 use warnings;
  1         3  
  1         150  
5 1     1   7 use utf8;
  1         6  
  1         6  
6              
7              
8 1     1   902 use Lingua::AR::Word::Stem; #needed to find the stem
  1         3  
  1         37  
9 1     1   788 use Lingua::AR::Word::Encode; #needed to encode into ArabTeX
  1         3  
  1         410  
10              
11              
12             our $VERSION = '1.5.7';
13              
14              
15             sub new{
16              
17 1     1 0 16 my $class=shift;
18              
19 1         7 my $this={
20             _word=>shift,
21             _stem=>"",
22             _arabtex=>""
23             };
24              
25 1         8 $this->{_stem}=&stem($this->{_word});
26 1         6 $this->{_arabtex}=&encode($this->{_word});
27              
28 1         7 bless($this,$class);
29             }
30              
31              
32              
33             sub get_word{
34 1     1 0 3207 $_[0]->{_word};
35             }
36              
37             sub get_stem{
38 1     1 0 6 $_[0]->{_stem};
39             }
40              
41             sub get_arabtex{
42 1     1 0 6 $_[0]->{_arabtex};
43             }
44              
45              
46              
47             1;
48             __END__