creeble has asked for the wisdom of the Perl Monks concerning the following question:
file1:
file 2:package thing; use Class::Struct::FIELDS; struct (thing => {qw { this $ that @ }});
and finally:package morething; use Class::Struct::FIELDS; use thing; struct (morething => [qw(thing)], { qw{ another $ yetmore @ }});
Works great under 5.8.5, but under 5.10 I get:use thing; use morething; $mt = morething->new; $mt->this('issomething');
Okay, I'm ready to be completely embarrassed by being told I should use something more modern for data inheritance, but I'm somewhat shocked that this could be so utterly broken between two minor (!) Perl version releases.Modification of a read-only value attempted at (eval 7) line 48.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Class::Struct::FIELDS broken under 5.10?
by Corion (Patriarch) on Jun 16, 2011 at 15:46 UTC | |
|
Re: Class::Struct::FIELDS broken under 5.10?
by toolic (Bishop) on Jun 16, 2011 at 15:55 UTC | |
by creeble (Sexton) on Jun 16, 2011 at 17:14 UTC |