1
#! /usr/local/bin/perl -w
3
#########################
5
# Script dependent.pl #
6
# Wolfgang Bluhm, SDSC #
8
#########################
10
# writes a list of all dependent item definitions in dictionary
15
my $dict = STAR::Dictionary->new($ARGV[0]);
16
my @saves = $dict->get_save_blocks; # these describe both items and cats
19
my (@depend_items, $depend_item);
21
open (OUT, ">$ARGV[1]");
24
print OUT "\tDependent items\n";
25
print OUT "---------------------------\n\n";
27
foreach $save ( @saves ) {
28
if ( $save =~ /\./ ) { #this is an item
29
@depend_items = $dict->get_item_data(-save=>$save,
30
-item=>"_item_dependent.dependent_name");
31
if ( $#depend_items >=0 ) {
33
foreach $depend_item ( @depend_items ) {
34
print OUT "\t$depend_item\n";
44
Reads the saved data structure of a dictionary (.cob file), and outputs
45
a file with a list of dependent item definitions contained in the dictionary.
49
perl dependent.pl <dict.cob> <outfile>