| 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__ |