in reply to Confused about splitting program into multiple files.
"I cannot install this as a module on the system, I only have limited access to where I can put my files."
I would like to bring your attention to non-priviledged installations in case you didn't already know that you can install modules on your system. :)
(updated ... added paragraph)
Now then. As for exporting ... why do people think that exporting is easier to implement
then OO? If you stick with OO methods (that is, you instantiate a class and use it's methods)
then you never have to worry about cluttering namespace or getting the Export code correct.
Besides, these days you can cheat big time with modules like Class::MethodMaker that
"write the code for you." Observe:
Much nicer. :)my $dude = new Person; $dude->name('Spicoli'); $dude->age(20); print $dude->as_string, "\n"; package Person; use Class::MethodMaker new => 'new', get_set => [qw(name age)], ; sub as_string { my $self = shift; return $self->name . ' (' . $self->age . ')'; }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Confused about splitting program into multiple files.
by davido (Cardinal) on Feb 15, 2004 at 16:16 UTC | |
by jeffa (Bishop) on Feb 15, 2004 at 16:28 UTC |