7 # CC This lib path is unnecessary - commented out as supercedes the 'lib' use in jpred itself.
8 #use lib qw(/homes/jon/cvs/jon/jpred/src /homes/jon/usr/lib/perl5);
12 Root - Base module for new classes to inherit from
16 This modules provides a new method for other classes to use if they so wish.
20 =head2 new(foo => "bar")
22 This constructs an object of the right class and returns it. Any arugments passed to the constructer
23 will be parsed as a hash with the first argument from the pair acting as the method that should
24 be called and the second being the argument for that method.
29 my ( $class, %args ) = @_;
30 my $self = bless {}, ref($class) || $class;
33 croak "No such method '$_'" unless $self->can($_);
34 $self->$_( $args{$_} );
45 while ( my @caller = caller $i ) {
47 #print join("#", map { defined $_ ? $_ : ""} @caller), "\n";
48 print $caller[0], ":", $caller[2], " ", $caller[3], "\n";
54 my ( $self, @message ) = @_;
55 print STDERR join( "\n", @message ), "\n";