XP is just a number | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You probably already know you need to implement several subroutines. Is there any state that needs to be shared among them? If so, use OOP; if not, there's no need for it.
It's not that hard to start one way and switch to the other paradigm later if needed, e.g. when you discover you need subclassing or some kind of a testing trick (mocking, dependency injection) for a procedural module or you realise you haven't used $self in any of the methods.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In reply to Re: Procedural vs OOP modules
by choroba
|
|