in reply to Advice on OO Program structure & organization
OO is not just design, OO is for reusability. So, don't write any read and write methods, just use another Class/Module that already exists, in this case IO::All, and call it:
Class::HPLOO is just a module that enables this kind of OO syntax for Perl. But I recommend to learn the pure Perl style, since with it you are free to do anything. But this style above save me a lot of time. ;-Puse Class::HPLOO ; class Foo { use IO::All ; ## Object initializer: sub Foo ($file) { $this->{file_data} < io($file) ; } }
Graciliano M. P.
"Creativity is the expression of liberty".
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Advice on OO Program structure & organization
by Anonymous Monk on Dec 13, 2004 at 17:08 UTC | |
by gmpassos (Priest) on Dec 14, 2004 at 23:11 UTC | |
by Anonymous Monk on Dec 15, 2004 at 14:59 UTC |
In Section
Seekers of Perl Wisdom