[NUUG fiksgatami] [patch] Fix for strange perl error (Was: Stuck setting up our fixmystreet copy - strange error)
Petter Reinholdtsen
pere at hungry.com
Sat Jan 10 17:57:09 CET 2009
[Matthew Somerville]
> Glad to hear it! So you're saying that Perl 5.10 changes
> fields::new() to bless the object itself? I haven't looked at 5.10
> closely, we're still on 5.8. I guess the code is probably not using
> fields::new() correctly? It's rather old code in general.
It sure look like it, yeah. Or something similar. This suspect this
test case exposes the problem:
perl -Mstrict -Mwarnings -e \
'use fields; my $self = {}; $self = fields::new("fields"); $self = bless $self, "fields";'
When using perl 5.10, I get this error:
Modification of a read-only value attempted at -e line 1.
With perl 5.8.8, I get no error.
I guess the $self content someone is read-only with perl 5.10.
Happy hacking,
--
Petter Reinholdtsen
More information about the fiksgatami
mailing list