in reply to Re: When are packages the right design choice?
in thread When are packages the right design choice?
pass around a pointer to the hash instead of using argument lists
Err, you mean a reference to a hash. Perl doesn't have pointers.
"When should I bless a hash pointer to make Real Perl OOTM code?"
IMHO, you should just bless the sucker and be done with it. In the simple case, the worst that can happen is that you move the first argument to the left side of the sub's name (and it'll be a little slower, but that probably won't matter). But if you don't bless, you will have a much harder time getting inheirtance and polymorphism to work.
There are many "trivial OO" systems, but they often break down under anything more than a trivial class heirachracy.
----
send money to your kernel via the boot loader.. This and more wisdom available from Markov Hardburn.
|
|---|