in reply to Re: How do I bury some code ?
in thread How do I bury some code ?
My idea is to separate the bunch of methods I have around for a given structure into some different modules/files, without having to refer to all of them in the Module that defines the structure (Word.pm above). In such a way that only Languages.pm deals with Fench.pm and Italian.pm and I only have to make changes to Languages.pm if I want to add - say - German.pm# Word.pm package Word; use strict; use Class::Struct; use WordExposed::Languages; use WordExposed::LanguagesPrivate::French; # IT WORKS use WordExposed::LanguagesPrivate::Italian; # IT WORKS struct Word => { english => '$', language => '$', translation => '$', }; sub set { my $self = shift(); my $english = shift(); my $language = shift(); $self->english($english); $self->language($language); $self->_translate(); } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How do I bury some code ?
by Anno (Deacon) on Aug 31, 2007 at 14:55 UTC | |
by rbi (Monk) on Aug 31, 2007 at 16:14 UTC | |
by Anno (Deacon) on Aug 31, 2007 at 16:30 UTC |