compile error on perl5.005_03

[prev] [thread] [next] [Date index for 2004/10/22]

From: lists
Subject: compile error on perl5.005_03
Date: 20:23 on 22 Oct 2004
I just installed Class::DBI manually and can 'use' it fine on perl5.8. But perl5.005_03, the default on my system and what I use for most scripting, dies trying to compile Class::DBI with the following error:

Can't modify logical or assignment in logical and assignment at /services/http/\
users/r/ryantate/cgi-bin/lib/Class/DBI.pm line 176, near "" AS $alias";"
BEGIN not safe after errors--compilation aborted at /services/http/users/r/ryan\
tate/cgi-bin/lib/Class/DBI.pm line 405.

The referenced line 176 of Class::DBI 0.96 is this, from inside "sub transform_sql":

                ($alias ||= "") &&= " AS $alias";

Since Class::DBI 'require's only perl5.00502, and since I can't find anything in the perldocs indicating it will not work with 5.005_03, I wonder why I am getting a syntax error on the module itself. Does this indicate I have installed one of the dependancies improperly? Are there known erros with Class::DBI on 5.005_03? I haven't been able to find anything in the archive for this list.

On the other hand, 0.96 has been out since April, so I have trouble believing this is an undiscovered bug.

Below I have included a shell session transcript. The script 'cdbi' simply 'use lib's my module library and then attempts 'use Class::DBI'.

-Ryan

---
apocalypse.OCF.Berkeley.EDU [75] perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos mudslide.ocf.berkeley.edu 5.6 generic_105181-10 sun4u sparc sunw,ultr\
a-5_10 '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O', gccversion=
    cppflags='-I/usr/local/include -I/opt/local/include'
    ccflags ='-I/usr/local/include -I/opt/local/include'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /opt/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldb -ldl -lm -lc -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-KPIC', lddlflags='-G -L/usr/local/lib -L/opt/local/lib'


Characteristics of this binary (from libperl):
  Built under solaris
  Compiled at Nov  5 1999 15:09:48
  @INC:
    /opt/local/packages/perl-5.005_03/lib/5.00503/sun4-solaris
    /opt/local/packages/perl-5.005_03/lib/5.00503
    /opt/local/packages/perl-5.005_03/lib/site_perl/5.005/sun4-solaris
    /opt/local/packages/perl-5.005_03/lib/site_perl/5.005
    .
apocalypse.OCF.Berkeley.EDU [76] perl -c cdbi
Can't modify logical or assignment in logical and assignment at /services/http/users/r\
/ryantate/cgi-bin/lib/Class/DBI.pm line 176, near "" AS $alias";"
BEGIN not safe after errors--compilation aborted at /services/http/users/r/ryantate/cg
i-bin/lib/Class/DBI.pm line 405.
BEGIN failed--compilation aborted at cdbi line 5.
apocalypse.OCF.Berkeley.EDU [77] perl5.8 -c cdbi
cdbi syntax OK
apocalypse.OCF.Berkeley.EDU [78] perl5.8 -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi-64int
    uname='sunos war.ocf.berkeley.edu 5.8 generic_108528-14 sun4u sparc sunw,sun-blade\
-100 '
    config_args='-ders -Dcc=gcc3 -Dprefix=/opt/local/packages/perl-5.8.0 -Dperladmin=s\
mcc@xxx.xxxxxxxx.xxx -Dusethreads -Dusemorebits -Uinstallusrbinperl -Alocincpth=/opt/l\
ocal/include /opt/local/X11/include /opt/local/gnu/include -Aloclibpth=/opt/local/lib \
/opt/local/gnu/lib /opt/local/X11/lib -Aldflags=-R/opt/local/lib -R/opt/local/X11/lib \
-R/opt/local/gnu/lib'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc3', ccflags ='-D_REENTRANT -fno-strict-aliasing -I/opt/local/include -I/opt\
/local/X11/include -I/opt/local/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64\
',
    optimize='-O',
    cppflags='-D_REENTRANT -fno-strict-aliasing -I/opt/local/include -I/opt/local/X11/\
include -I/opt/local/gnu/include'
    ccversion='', gccversion='3.0.4', gccosandvers='solaris2.8'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=\
8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc3', ldflags =' -R/opt/local/lib -R/opt/local/X11/lib -R/opt/local/gnu/lib -\
L/usr/local/lib -L/opt/local/lib -L/opt/local/gnu/lib -L/opt/local/X11/lib '
    libpth=/usr/local/lib /opt/local/lib /opt/local/gnu/lib /opt/local/X11/lib /usr/li\
b /usr/ccs/lib
    libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lrt -lpthread -lc
    perllibs=-lsocket -lnsl -ldl -lm -lrt -lpthread -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -R/opt/local/lib -R/opt/local/X11/lib -R/opt/loc\
al/gnu/lib -L/usr/local/lib -L/opt/local/lib -L/opt/local/gnu/lib -L/opt/local/X11/lib\
'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_64_BIT_INT USE_LARGE_FILES PERL_\
IMPLICIT_CONTEXT
  Built under solaris
  Compiled at Jul 19 2002 20:40:49
 Built under solaris
  Compiled at Jul 19 2002 20:40:49
  @INC:
    /opt/local/packages/perl-5.8.0/lib/5.8.0/sun4-solaris-thread-multi-64int
    /opt/local/packages/perl-5.8.0/lib/5.8.0
    /opt/local/packages/perl-5.8.0/lib/site_perl/5.8.0/sun4-solaris-thread-multi-64int
    /opt/local/packages/perl-5.8.0/lib/site_perl/5.8.0
    /opt/local/packages/perl-5.8.0/lib/site_perl
    .
apocalypse.OCF.Berkeley.EDU [79] 
apocalypse.OCF.Berkeley.EDU [79] cat cdbi
use strict;

use lib '/services/http/users/r/ryantate/cgi-bin/lib';

use Class::DBI;

apocalypse.OCF.Berkeley.EDU [80]  

compile error on perl5.005_03
lists 20:23 on 22 Oct 2004

Re: compile error on perl5.005_03
lists 21:36 on 22 Oct 2004

Re: compile error on perl5.005_03
Tony Bowden 14:21 on 24 Oct 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52