nite_man has asked for the wisdom of the Perl Monks concerning the following question:
Background
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;
Problem
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!
Back to
Seekers of Perl Wisdom