my $dbh=DBI->connect($dsn,$opts{user}{value},$opts{password}{value}) | +| die($!);
The || operator has higher precedence than the = operator so you should either enclose the assignment in parentheses or use the lower precedence or operator.
According to the DBI manual:
If the connect fails (see below), it returns "undef" and sets both $DBI::err and $DBI::errstr. (It does not explicitly set $!.) You should generally test the return status of "connect" and "print $DBI::errstr" if it has failed.
So that line should be:
my $dbh = DBI->connect( $dsn, $opts{ user }{ value }, $opts{ password +}{ value } ) or die $DBI::errstr;
crash_n_burn() if $cl_part=~/^-h$|^--help$|^-h$/i;
If the first ^-h$ pattern doesn't match what makes you think that the second one will?
$s_insert=<<EOT; /* Insert SP for $table */ drop procedure if exists insert_$table; delimiter // create procedure insert_table ( EOT
Shouldn't that be:
$s_insert=<<EOT; /* Insert SP for $table */ drop procedure if exists insert_$table; delimiter // create procedure insert_$table ( EOT
In reply to Re: sql-o-matic
by jwkrahn
in thread sql-o-matic
by smiffy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |