in reply to Re: Class::Accessor Problem
in thread Class::Accessor Problem
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 )package Variant; use strict; use warnings; use Exporter; use Class::Accessor; our ( @EXPORT, @EXPORT_OK, %EXPORT_TAGS ); @EXPORT = qw(); %EXPORT_TAGS= (); @EXPORT_OK = qw(); use base ( qw(Exporter Class::Accessor) ); our ( $VERSION, $LAST_ERROR ); __PACKAGE__->mk_accessor( qw(name nodes) );
|
|---|