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:
use Class::HPLOO ;
class Foo {
use IO::All ;
## Object initializer:
sub Foo ($file) {
$this->{file_data} < io($file) ;
}
}
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. ;-P
Graciliano M. P.
"Creativity is the expression of liberty".