#!perl # example by Dennis Box 1/5/99 # first parser by Kirsten Tollefson 4/6/99 # modified Kevin McFarland 4/13/99 package build; use strict; use Exporter (); use vars qw(@ISA @EXPORT); BEGIN { @ISA = qw(Exporter); @EXPORT = qw(&getBuild); } 1; #----------------- sub getBuild { use DBI; use strict; my $dbname="b0dau30.fnal.gov"; my $user; my $password; my $temp; open (USERNAME,"../tcl/test.user") || die "can't open file: $!"; while (defined ($temp = )) { chomp $temp; $user = $temp; # print "user is $user\n"; $password=; chomp $password; # print "password is $password\n"; } close (USERNAME) || die "couldn't close file: $!"; my $template = shift; # #note how connection specifies Oracle here, msql, mysql or any #other DBI driver will work exactly the same # my ($dbh) = DBI->connect($dbname,$user,$password,'Oracle') || die "Error connecting $DBI::errstr\n"; my $headref; my $buildref; my $name; ($headref,$buildref) = &doSQL; $dbh->rollback; $dbh->disconnect; # # now that query is complete, go through template file # and send the build file to standard output # my $myfile=$template; my $line; open(TEMPLATE, $myfile) or die "unable to open $myfile:$!"; while( $line =