1
package STAR::Dictionary;
4
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK );
7
@ISA = qw( STAR::DataBlock );
11
# $Id: Dictionary.pm,v 1.2 2000/12/19 22:54:56 helgew Exp $ RCS Identification
19
my ($proto, @parameters) = @_;
20
my $class = ref($proto) || $proto;
24
$file = shift @parameters unless $#parameters;
25
while ($_ = shift @parameters) {
26
$file = shift @parameters if /-file/;
30
$self = Storable::retrieve($file);
41
##################################
42
# Object method: get_save_blocks #
43
##################################
51
foreach $d ( sort keys %{$self->{DATA}} ) {
52
foreach $s ( sort keys %{$self->{DATA}{$d}} ) {
65
STAR::Dictionary - Perl extension for handling dictionaries that
66
were parsed from STAR compliant files.
70
This documentation refers to version 0.56 of this module.
76
$dict_obj = STAR::Dictionary->new(-file=>$file);
77
@items_in_dict = $dict_obj->get_save_blocks;
81
This package contains class and object methods for Dictionary objects
82
created by STAR::Parser.
83
This class is a sub class of STAR::DataBlock. It supports all methods from
84
STAR::DataBlock (see related documentation), as well as the
85
additional method get_save_blocks.
89
=head2 get_save_blocks
91
Usage: @save_blocks = $dict_obj->get_save_blocks;
93
This methods returns an array with all save_ blocks found in the Dictionary
94
object. Each item defined in the dictionary is described within a save block.
95
In addition, items pertaining to the dictionary itself (such as
96
_dictionary.version) are found outside of save blocks in the dictionary file.
97
In the data structure of a Dictionary object, these items are gathered
98
in a C<$s='-'> save block.
102
Wolfgang Bluhm, mail@wbluhm.com
104
=head2 Acknowledgments
106
Thanks to Phil Bourne, Helge Weissig, Anne Kuller, Doug Greer,
107
Michele Bluhm, and others for support, help, and comments.
111
A full copyright statement is provided with the distribution
112
Copyright (c) 2000 University of California, San Diego
116
STAR::Parser, STAR::DataBlock.