lib/WordNet/SenseRelate/Instance.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 40 CC 3 SCAR 15.4
CC
3
Cov
0%
new
6.0
getInstance
6.0
BEGIN
2.0
CRAP 4.7
1 # WordNet::SenseRelate::Instance v0.09
2 # (Last updated $Id: Instance.pm,v 1.5 2006/12/24 12:18:45 sidz1979 Exp $)
3  
4 package WordNet::SenseRelate::Instance;
5  
6 use strict;
7 use vars qw($VERSION @ISA);
8  
9 @ISA = qw(Exporter);
10 $VERSION = '0.09';
11  
12 # Constructor for this module
13 sub new
14 {
15 my $class = shift;
16 my $self = {};
17  
18 # Create the Instance object
19 $class = ref $class || $class;
20 bless($self, $class);
21  
22 # Set the Instance
23 $self->{word} = "";
24 my $word = shift;
25 $self->{word} = $word if (defined $word);
26  
27 return $self;
28 }
29  
30 # Return the Instance
31 sub getInstance
32 {
33 my $self = shift;
34 return undef if (!defined $self || !ref $self);
35 return $self->{word};
36 }
37  
38 1;
39  
40 __END__