|
|
sybperl-l Archive
Up Prev Next
From: "W dot Phillip Moore" <wpm at ms dot com>
Subject: Sybperl 2.10.01 on Sun Solaris 2.5.1
Date: May 13 1999 2:42PM
>>>>> "Michael" == Michael Peppler writes:
>> syntax error at ../blib/lib/Sybase/DBlib.pm line 458, near "->("
>> syntax error at ../blib/lib/Sybase/DBlib.pm line 464, near "else"
>> syntax error at ../blib/lib/Sybase/DBlib.pm line 469, near "elsif"
Michael> There's some code in the nsql() section of the module that seems to
Michael> require perl 5.004 or later.
Michael> Maybe Phil Moore can take a look at it...
Well, my first suggestion may not be an option for you, but you
*really* should consider upgrading to perl5.005. Having said that, I
am aware that this is not as trivial as some people make it out to be,
especially in large environments, and especially when you don't own
the core perl interpreter yourself.
So....
Looks like its choking on the dereferencing of the $callback CODE
reference. Line 458 is:
unless ( $callback->(%data) ) {
I suspect the other pair of errors are side effects of this.
It appears that the ->() syntax was added sometime between 5.002 and
5.004, so you'll have to switch back to the older dereferencing style.
Apply this patch on top of sybperl-2.10_01's DBlib.pm, and see if your
qualify of life doesn't improve.
BTW, this also includes the two other fixes I recently posted.
*** DBlib.pm-orig Thu May 13 10:36:58 1999
--- DBlib.pm Thu May 13 10:39:37 1999
***************
*** 421,427 ****
carp "SQL deadlock encountered. Retrying...\n" if $retryverbose;
undef $DB_ERROR;
sleep($retrysleep);
! next DEADLOCK;
}
else {
carp "SQL deadlock retry failed $nsql_deadlock_retrycount times. Aborting.\n"
--- 421,427 ----
carp "SQL deadlock encountered. Retrying...\n" if $retryverbose;
undef $DB_ERROR;
sleep($retrysleep);
! redo DEADLOCK;
}
else {
carp "SQL deadlock retry failed $nsql_deadlock_retrycount times. Aborting.\n"
***************
*** 442,448 ****
undef $DB_ERROR;
@res = ();
sleep($retrysleep);
! next DEADLOCK;
}
else {
carp "SQL deadlock retry failed $nsql_deadlock_retrycount times. Aborting.\n"
--- 442,448 ----
undef $DB_ERROR;
@res = ();
sleep($retrysleep);
! redo DEADLOCK;
}
else {
carp "SQL deadlock retry failed $nsql_deadlock_retrycount times. Aborting.\n"
***************
*** 455,461 ****
while ( %data = $db->dbnextrow(1) ) {
grep($data{$_} =~ s/\s+$//g,keys %data) if $nsql_strip_whitespace;
if ( ref $callback eq "CODE" ) {
! unless ( $callback->(%data) ) {
$db->dbcancel();
$DB_ERROR = "User-defined callback subroutine failed\n";
return;
--- 455,461 ----
while ( %data = $db->dbnextrow(1) ) {
grep($data{$_} =~ s/\s+$//g,keys %data) if $nsql_strip_whitespace;
if ( ref $callback eq "CODE" ) {
! unless ( &$callback(%data) ) {
$db->dbcancel();
$DB_ERROR = "User-defined callback subroutine failed\n";
return;
***************
*** 470,476 ****
while ( @data = $db->dbnextrow ) {
grep(s/\s+$//g,@data) if $nsql_strip_whitespace;
if ( ref $callback eq "CODE" ) {
! unless ( $callback->(%data) ) {
$db->dbcancel();
$DB_ERROR = "User-defined callback subroutine failed\n";
return;
--- 470,476 ----
while ( @data = $db->dbnextrow ) {
grep(s/\s+$//g,@data) if $nsql_strip_whitespace;
if ( ref $callback eq "CODE" ) {
! unless ( &$callback(@data) ) {
$db->dbcancel();
$DB_ERROR = "User-defined callback subroutine failed\n";
return;
|