develooper Front page | perl.perl5.porters | Postings from May 2003

[perl #22229] [no subject]

Thread Next
From:
Roman Hlynovskiy
Date:
May 17, 2003 17:58
Subject:
[perl #22229] [no subject]
Message ID:
rt-22229-57778.0.685028349789292@bugs6.perl.org
# New Ticket Created by  Roman Hlynovskiy 
# Please include the string:  [perl #22229]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=22229 >


Hello , perlbug

i think i found some kind of bug. below you'll find short description
and this is the sample, showing it...

----------------------------------------------------------------------
[root@lnx01][capturer]#> cat gluck.pl
#!/usr/bin/perl

$a = 0;
$b = 0;

print "increasing a to 1\n" if ($a++);
print "increasing a to 2\n" if ($a++);

print "increasing b to 1\n" if ($b+=1);
print "increasing b to 2\n" if ($b+=1);

print "increasing c to 1\n" if ($c++);
print "increasing c to 2\n" if ($c++);

print "increasing d to 1\n" if ($d+=1);
print "increasing d to 2\n" if ($d+=1);
[root@lnx01][capturer]#> ./gluck.pl 
increasing a to 2
increasing b to 1
increasing b to 2
increasing c to 2
increasing d to 1
increasing d to 2
----------------------------------------------------------------------
i.e. if trying to increase zero-valued (or undefined) scalar the
result is always false if using '++' operator.
below is perl -V from my system. i also tried it on 5.005_03 and it
worked the same manner.
----------------------------------------------------------------------
[root@lnx01][capturer]#> perl -V      
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=linux, osvers=2.4.13, archname=i386-linux
    uname='linux duende 2.4.13 #1 wed oct 31 19:18:07 est 2001 i686 unknown '
    config_args='-Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr -Dprivlib=/usr/share/perl/5.6.1 -Darchlib=/usr/lib/perl/5.6.1 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.6.1 -Dsitearch=/usr/local/lib/perl/5.6.1 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Duseshrplib -Dlibperl=libperl.so.5.6.1 -Dd_dosuid -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='cc', ccflags ='-DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-DDEBIAN -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.4  (Debian prerelease)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lgdbm -ldb -ldl -lm -lc -lcrypt
    perllibs=-ldl -lm -lc -lcrypt
    libc=/lib/libc-2.2.4.so, so=so, useshrplib=true, libperl=libperl.so.5.6.1
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at Jan 11 2002 04:09:18
  @INC:
    /usr/local/lib/perl/5.6.1
    /usr/local/share/perl/5.6.1
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.6.1
    /usr/share/perl/5.6.1
    /usr/local/lib/site_perl
----------------------------------------------------------------------

--- 
...WBR, Roman Hlynovskiy (n-other@express-k.kz)



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About