nite_man has asked for the wisdom of the Perl Monks concerning the following question:
I've developed a couple of Perl classes using paradigma 'fields'. I've needed it because it's so easy to inherit, add new properties and it doesn't need to rewrite object constructor and inizializator.
I create object like that:
no strict "refs"; my $self = bless [\%{"${caller}::FIELDS"}], $class;
All worked perfectly till Perl 5.8.0 was released. I have warning "Pseudo-hashes are deprecated at ..." when I try to run my script which uses developed classes under Perl 5.8.0. I know that using fields is going to be deprecated.
So, my question is how can use fields now?TIA
---
Michael Stepanov aka nite_man
It's only my opinion and it doesn't have pretensions of absoluteness!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use fields;
by Corion (Patriarch) on Nov 23, 2004 at 07:19 UTC | |
by nite_man (Deacon) on Nov 23, 2004 at 08:05 UTC | |
by Corion (Patriarch) on Nov 23, 2004 at 08:12 UTC | |
by nite_man (Deacon) on Nov 23, 2004 at 08:28 UTC | |
by Corion (Patriarch) on Nov 23, 2004 at 08:31 UTC | |
|