develooper Front page | perl.perl5.porters | Postings from March 2000

[ID 20000316.002] Math::BigInt and string ops

Matthias Urlichs
March 16, 2000 02:59
[ID 20000316.002] Math::BigInt and string ops
Message ID:
This is a bug report for perl from,
generated with the help of perlbug 1.26 running under perl 5.006.

[Please enter your report here]

$ perl -e 'use Math::BigInt;
           $foo = new Math::BigInt 12345;
           $foo =~ s/^\+//;
           print "$foo\n";
           $foo = int($foo/10+0.5);
           print "$foo\n"; '

*Sigh* Under 5.005, the above code was a legitimate method to convert
$foo to a normal string/number/whatever, thus the above code actually


instead. Can we please reinstate the old behavior?

Incidentally, it seems that the ability to overload s/// would be rather
nice. The method would get the new value as input, and should return
either a new object which stringifies to that value, or the original
string, which is then assigned to the left-hand side of the =~.

[Please do not change anything below this line]

This perlbug was built using Perl 5.00503 - Mon Aug 30 23:08:56 EDT 1999
It is being executed now by  Perl 5.006 - Mon Mar 13 11:48:30 CET 2000.

Site configuration information for perl 5.006:

Configured by smurf at Mon Mar 13 11:48:30 CET 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
    osname=linux, osvers=2.2.15-2.5.0smp, archname=i686-linux-thread-multi-64all
    uname='linux 2.2.15-2.5.0smp #1 smp sat feb 5 00:21:58 est 2000 i686 unknown '
    config_args='-Uusenm -Duseshrplib=true -Dman1dir=/usr/man/man1 -Dman3dir=/usr/man/man3 -Dstartperl=#!/usr/bin/perl -Dprefix=/usr/lib/perl -d -e -Dman1ext=1p -Dman3ext=3p -Dusemultiplicity -Dusethreads -Duseithreads -Duse64bitall -Duselargefiles -Dd_dosuid -Duselongdouble'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=define use64bitall=define uselongdouble=define usesocks=undef
    cc='cc', optimize='-O2 -g', gccversion=2.95.2 19991024 (release)
    cppflags='-D_REENTRANT -fno-strict-aliasing'
    ccflags ='-D_REENTRANT -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, 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=-lnsl -lndbm -ldb -ldl -lm -lpthread -lc -lposix -lcrypt
    libc=/lib/, so=so, useshrplib=true,
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl/lib/5.6.0/i686-linux-thread-multi-64all/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:

@INC for perl 5.006:

Environment for perl 5.006:
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
    SHELL=/bin/bash Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About