Subversion Repositories havirt

Rev

Rev 4 | Rev 12 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 10
Line 44... Line 44...
44
our @ISA = qw( Exporter );
44
our @ISA = qw( Exporter );
45
our @EXPORT = qw( 
45
our @EXPORT = qw( 
46
                  &readDB &writeDB
46
                  &readDB &writeDB
47
                  &report
47
                  &report
48
                  &loadNodePopulations
48
                  &loadNodePopulations
-
 
49
                  &loadNodeDB
-
 
50
                  &loadVirtDB
49
                );
51
                );
50
 
52
 
51
 
53
 
52
 
54
 
53
sub readDB {
55
sub readDB {
Line 115... Line 117...
115
   for ( $row = 0; $row < @$data; $row++ ) {
117
   for ( $row = 0; $row < @$data; $row++ ) {
116
      $output .= sprintf( $format, @{$data->[$row]} );
118
      $output .= sprintf( $format, @{$data->[$row]} );
117
   } # for row
119
   } # for row
118
   return $output;
120
   return $output;
119
}
121
}
-
 
122
 
-
 
123
# read the node database into memory, if it was not already loaded
-
 
124
sub loadNodeDB {
-
 
125
   print "In loadNodeDB, reading $main::nodeDBName\n" if $main::DEBUG > 1;
-
 
126
   return if $main::nodeDB;
-
 
127
   $main::nodeDB = &main::readDB( $main::nodeDBName );
-
 
128
   print "Success\n" if $main::DEBUG > 1;
-
 
129
}
-
 
130
 
-
 
131
sub loadVirtDB {
-
 
132
   return if $main::virtDB;
-
 
133
   $main::virtDB = &main::readDB( $main::domainDBName );
-
 
134
}
-
 
135