NAME

fiEval - FileInterface-eval class to evaluate calls to the FileInterface and catch errors.

SYNOPSIS

   use fiEval;

   # instantiate
   my $ev=fiEval->new();

   # evaluate a call to create dataset with id 314
   if (!$ev->evaluate("create",314)) {
      # something went wrong creating the dataset
      print "ERROR! Unable to create dataset: ".$ev->error()."\n";
   }

CONSTRUCTOR

new()

Instantiates the fiEval-class.

Accepts one input parameter: fi. fi is the instance of the FileInterface-class to use. Optional. Recommended to state, but if not stated will create a new FileInterface-instance.

Returns the class-instance upon success.

METHODS

evaluate()

Evaluates a method on the fi-instance.

Input parameters are in this order: method, parameters. "Method" is the textual name of the method to call on the FileInterface- instance. "Parameters" are one or more parameters to the method being called.

The method will return the result from the method-call upon success, undef upon some failure. Please call the error()-method for more information upon a failure.

success()

Returns if the last method called was finished successfully or not.

No input accepted.

Returns if the last method that was called finished successfully or not, including the new()-method.

Returns 1 upon success, 0 upon failure. Please check the error()-method for more information upon failure.

error()

Returns the last error of the fiEval-class, if any.