STAR::Checker(3) Perl extension for checking DataBlock objects

Version

This documentation refers to version 0.02 of this module.

SYNOPSIS


use STAR::Checker;

$check = STAR::Checker->check( -datablock=>$ARGV[0],
-dictionary=>$ARGV[1] );

DESCRIPTION

Contains the checker object, with methods for checking DataBlock object against STAR rules and against a specified dictionary. DataBlock objects are created by Parser and modified by DataBlock.

CLASS METHODS

check

  Usage:   $check = STAR::Checker->check(-datablock=>$data, 
                                         -dictionary=>$dict [,
                                         -options=>$options ] );

Checks the DataBlock object $data against the dictionary object $dict (see STAR::Parser and STAR::DataBlock). Checks 1) whether all items in the DataBlock are defined in the dictionary, 2) whether mandatory items are present in the file, 3) whether dependent items are present in the file (e.g. cartn_x makes cartn_y and cartn_z dependent), 4) whether parent items are present, and 5) whether the item values in the DataBlock conform to the item type definitions in the dictionary.

Returns 1 if the check was successful (no problems were found), and 0 if the check was unsuccessful (problems were found). A list of the specific problems is written to STDERR when "-options=>'l'" is specified.

AUTHOR

Wolfgang Bluhm, [email protected]

Acknowledgments

Thanks to Phil Bourne, Helge Weissig, Anne Kuller, Doug Greer, Michele Bluhm, and others for support, help, and comments.

COPYRIGHT

A full copyright statement is provided with the distribution Copyright (c) 2000 University of California, San Diego