Subject: | $object->new($new_value) returns the original value as classname |
This blesses the new object into some stringification of the old value
and the object memory address.
Example:
-------------------------
#!perl
use strict;
use warnings;
use Math::BigInt;
my $x = new Math::BigInt 27; # as expected, value 27
my $y = $x->new(44); # class is 27=HASH(0x151dfe4), though the
rest of the object is OK
my $z = $x->new(); # as expected, value 0
my $q = $x->new(99) + 1; # 22754941 (large number, treating memory
address as a number)
exit;
----------------------------------
From debugger:
-----------------------------------
main::(object_new.pl:7): my $x = new Math::BigInt 27;
DB<1>
DB<1> n
main::(object_new.pl:8): my $y = $x->new(44);
DB<1> x $y
0 27=HASH(0x151d944)
'sign' => '+'
'value' => ARRAY(0x1511e4c)
0 44
--------------------------------------
Math::BigInt.pm shows a version of 1.998, which is not listed here.
Strawberry Perl:
This is perl 5, version 16, subversion 1 (v5.16.1) built for
MSWin32-x86-multi-thread