NAME

Math::LP::Object - base class for objects in the Math::LP family

SYNOPSIS

package Math::LP::XXX; # a new member XXX in the family

# derive XXX from Object
use Math::LP::Object;
use base qw(Math::LP::Object);
use fields qw(foo bar);

sub initialize {
    my Math::LP::XXX $this = shift;
    # put XXX specific initialization code here
}

DESCRIPTION

Math::LP::Object provides the following methods to classes derived from it:

new()

Returns a new object, blessed in the package which it was called for. The returned object is a pseudo-hash, with fields specified using the fields pragma.

new() optionally accepts a hash of initial values of the data fields. After these values have been set, initialize() is called on the object. Specific initialization code for the derived class is thus to be put in the initialize() function of the derived class.

croak($msg)

Dies with an error message, adding info on the last caller outside the Math::LP family.

croak() can be invoked both as a method and a package function.

SEE ALSO

base, fields

AUTHOR

Wim Verhaegen <wim.verhaegen@ieee.org>

COPYRIGHT

Copyright(c) 2000 Wim Verhaegen. All rights reserved. This program is free software; you can redistribute and/or modify it under the same terms as Perl itself.