Syntactic Confectionery Delight | |
PerlMonks |
Re: Key-Board Interactive Perl Applicationby GrandFather (Saint) |
on Dec 12, 2012 at 05:44 UTC ( [id://1008453]=note: print w/replies, xml ) | Need Help?? |
For that sort of application I use light weight OO. Consider:
Prints:
There are a few subtle things going on there. If you've not used OO before notice that the object ($obj) carries along a hash reference so you can provide common information (see how 'indent' is used). The reason the sub names have a 'print_' prefix is so that user provided names can't be used to call unintended subs.
True laziness is hard work
In Section
Seekers of Perl Wisdom
|
|