JPRED-2 Move Jpred 3.0.1 to public Git
[jpred.git] / jpred / lib / Common.pm
1 package Common;
2 use strict;
3 use warnings;
4 use Carp;
5
6 sub path {
7         my ($self, $path) = @_;
8         if (defined $path) { $self->{__PACKAGE__."path"} = $path }
9         else {
10                 if (defined $self->{__PACKAGE__."path"}) {
11                         return $self->{__PACKAGE__."path"}
12                 }
13                 else { croak "path() is not defined" }
14         }
15 }
16
17 1;
18 __END__
19
20 =head1 NAME
21
22 Common
23
24 =head1 DESCRIPTION
25
26 Methods that might be useful to any other object, but not nessecery.
27
28 =head1 METHODS
29
30 =head2 $obj->path($path)
31
32 Get/Setter for the path of a filename.