line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::ParseAHD::Word; |
2
|
|
|
|
|
|
|
#use base qw(BASE); |
3
|
1
|
|
|
1
|
|
456
|
use Class::Std; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use Class::Std::Utils; |
5
|
|
|
|
|
|
|
use Text::ParseAHD::Definition; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use warnings; |
8
|
|
|
|
|
|
|
use strict; |
9
|
|
|
|
|
|
|
use Carp; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use version; our $VERSION = qv('0.0.2'); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $root_dir = '/home/roger/projects/comprehension/dictionary/dictionary.reference.com/browse/'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
{ |
16
|
|
|
|
|
|
|
my %word_id_of :ATTR( :get :set :default<''> :init_arg ); |
17
|
|
|
|
|
|
|
my %word_of :ATTR( :get :set :default<''> :init_arg ); |
18
|
|
|
|
|
|
|
my %syllables_of :ATTR( :get :set :default<''> :init_arg ); |
19
|
|
|
|
|
|
|
my %defs_of :ATTR( :get :set :default<[]> :init_arg ); |
20
|
|
|
|
|
|
|
my %text_of :ATTR( :get :set :default<''> :init_arg ); |
21
|
|
|
|
|
|
|
my %pos_of :ATTR( :get :set :default<''> :init_arg ); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub START { |
25
|
|
|
|
|
|
|
my ($self, $ident, $arg_ref) = @_; |
26
|
|
|
|
|
|
|
print "\nMY WORD IS: $word_of{$ident}\n"; |
27
|
|
|
|
|
|
|
return; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
sub add_definition { |
30
|
|
|
|
|
|
|
my ( $self, $text, $example, $pos) = @_; |
31
|
|
|
|
|
|
|
my $list = $self->get_defs(); |
32
|
|
|
|
|
|
|
push @$list, Text::ParseAHD::Definition->new({text=>$text, example => $example, pos => $pos}); |
33
|
|
|
|
|
|
|
$self->set_defs($list); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; # Magic true value required at end of module |
39
|
|
|
|
|
|
|
__END__ |