Subject: | Storable - retrieve or thaw a blessed ref to an arrayref |
system: SunOS pandora 5.7 Generic_106541-20 sun4u sparc SUNW,Ultra-250
perl: This is perl, v5.6.0 built for sun4-solaris
A test program is attached which exhibits the core dump on my system, with this output:
piersk@pandora~/src/stora> perl5.6 storable-testcase.pl
Perl on solaris and Storable 2.05
$VAR1 = bless( do{\(my $o = [
'begin',
'the',
'day',
'with',
'a',
'friendly',
'voice'
])}, 'X1' );
$VAR1 = bless( do{\(my $o = [
'begin',
'the',
'day',
'with',
'a',
'friendly',
'voice'
])}, '' );
Value is day
Bus Error (core dumped)
Note also that the clas changes from 'X1' to the empty string. Here is the perl -V output:
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=solaris, osvers=2.7, archname=sun4-solaris
uname='sunos pandora 5.7 generic_106541-04 sun4u sparc sunw,ultra-250 '
config_args='-de'
hint=previous, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='gcc', optimize='-O', gccversion=2.95.2 19991024 (release)
cppflags='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccflags ='-fno-strict-aliasing -I/usr/local/include -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=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under solaris
Compiled at Feb 2 2001 10:19:58
%ENV:
PERL5LIB="/home/system/johna/cgi-bin/education/lib:/home/system/johna/cgi-bin/lib:/home/system/cgi-bin/education/lib:/home/system/cgi-bin/lib
"
PERLDB_OPTS="RemotePort=10.163.9.69:2009"
@INC:
/home/system/johna/cgi-bin/education/lib
/home/system/johna/cgi-bin/lib
/home/system/cgi-bin/education/lib
/home/system/cgi-bin/lib
/usr/local/lib/perl5/5.6.0/sun4-solaris
/usr/local/lib/perl5/5.6.0
/usr/local/perl5.6/lib/site_perl/5.6.0/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl
.
#!/usr/local/bin/perl -w
use strict;
use Data::Dumper;
use lib './Storable-2.05/blib/lib', './Storable-2.05/blib/arch';
use Storable;
use constant INFO => 1;
print "Perl on $^O and Storable $Storable::VERSION\n";
my $rarray = [qw(begin the day with a friendly voice)];
my $brrarray = bless(\$rarray, 'X1');
my $serial = Storable::freeze($brrarray);
if (INFO) {
print Dumper($brrarray);
}
my $newscalar;
$newscalar = Storable::thaw($serial);
if (INFO) {print Dumper($newscalar);}
print "Value is " . ${$newscalar}->[2] . "\n";