Problems? Is your data what you think it is? | |
PerlMonks |
Re^2: Class::Accessor Problemby PerlingTheUK (Hermit) |
on Nov 27, 2005 at 16:52 UTC ( [id://512030]=note: print w/replies, xml ) | Need Help?? |
BrowserUK, Thanks, but it does not work I tried to remove the line from the BEGIN block and I also completely removed the block. Either option did not make a difference to the error message. The actual benchmark script coming with this package is running fine in my environment and I cannot spot my error. The current code - which still produces the above quoted error is: I have noticed, that the benchmark example as well as the examples in the documentation use either a base class with all fields defined or Class::Fields as base class. I intend - and only then does using Class:Accessor make sense to me to include it in a base class that does not yet know which fields are in my derived classes. Are there any issues with this setup? Do I need to define the fields of my class before calling mk_accessor( @fieldnames ) Cheers, PerlingTheUK
In Section
Seekers of Perl Wisdom
|
|