I'm trying to get a new Mac OS X machine up and running with the following script:

----------------------
#!e:/Perl/bin/perl.exe -w

$|=1;
use strict;
use DBI;
#use CGI qw(:standard);
use lib (qw(.));

#CONNECT TO THE DATABASE and EXECUTE SQL STATEMENT
my $user="CRAU";
my $pw="CRAU";
my $dsn="DBI:Proxy:hostname=10.100.0.101;port=1522;dsn=DBI:ODBC:BAYPT400 - B7333 Server Map";
my $dbh = DBI->connect($dsn,$user,$pw) or die "Error: $DBI::errstr\n";
my $sql="SELECT STRIP(XXUITM) XXUITM, STRIP(XXLOCNE1) LOCNE1, STRIP(XXDSC1) XXDSC1, STRIP(XXLOTN) LOTN, XXUOM1, STRIP(XXMCU) XXMCU, XXPQOH, XXUNCS, XXACUNC, XXAFXC, XXECST, XXAA, XXAAMC, XXDRQJ FROM PRODDTA/F55RMVAL";
my $sth = $dbh->prepare($sql);
$sth->execute; #executes the SQL statement handle replacing the ? with the $item variable


open (RESULT, ">RM.txt") or die;

  my @row = ();
        while (@row = $sth->fetchrow_array) {
        
                $row[5] = int ($row[5]);
                $row[6] = $row[6]/1000;
                $row[7] = $row[7]/10000;
                $row[8] = $row[8]/10000;
                $row[9] = $row[9]/10000;
                $row[10] = $row[10]/100;
                $row[11] = $row[11]/100;
                $row[12] = $row[12]/100;
                
                
        
                my $record =  join ("\t", @row) . "\r";
                print RESULT $record;
        }
        
$sth->finish;
$dbh->disconnect;
close RESULT;
----------------------

I've installed Bundle::DBI.  All the modules seem to be installed...
DBI, RPC::Client, RPC::Server, Net::Daemon, DBD::Proxy, CGI

I've got it running on one machine and it's a thing of beauty but whenever I try to run it on the "new" machine, I get this:

-----------------------
install_driver(Proxy) failed: Global symbol "$this" requires explicit package name at /Library/Perl/darwin/DBD/Proxy.pm line 272.
BEGIN not safe after errors--compilation aborted at /Library/Perl/darwin/DBD/Proxy.pm line 414.
Compilation failed in require at (eval 1) line 3.
-----------------------


I must have reinstalled everything a million times. Can anyone give me an idea of where I should start looking? My immediate feeling would be to reinstall DBD::Proxy but I get the feeling there's a dependency I'm not realizing. There's no problem on the Proxy Server end because I can run this script on my machine (also OS X). Any ideas?

Thanks in advance,
Cory Rau



Reply via email to