![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Creating accessors on the fly, or not...by ~~David~~ (Hermit) |
on Jun 12, 2009 at 21:22 UTC ( #771106=perlquestion: print w/replies, xml ) | Need Help?? |
~~David~~ has asked for the wisdom of the Perl Monks concerning the following question:
I am writing a module which reads in flat text files that are made of fields which contain a tag followed by a value (ex: Time 16:43:25; ). I know ahead of time what tags are allowed, but there are quite a few of them. I can think of two options to write this: 1.) Write an individual accessor for each tag 2.) Do this (which is what I have done but don't know if it is alright to do>: Maybe I have the wrong idea completely, but I was just wondering if I should choose one way or the other. The Moose tutorial says you should try to __PACKAGE__->meta->make_immutable; which my current method doesn't allow me to do...
Back to
Seekers of Perl Wisdom
|
|