I have several scripts which it would seem wise to turn into modules. Unfortunately, even though I have been using Perl for a long time, OO concepts still tend to feel unfamiliar to me.
I could certainly just follow perootut and perlobj, but I understand that learning Moo or something similar would make it much easier in the end, by delegating a lot of boilerplate code to such a constructor module. If only I could understand it's basics, and know where to look for simple examples...
Basically, what I do is read a file into one or more hashes, manipulate the data and write the file back.
My current interest is mainly in files like edit lists (like Avid ALE files) and subtitles of various formats (including binary formats, for which there is nothing in CPAN currently). Doing the whole thing in a simple Perl script is pretty straightforward, but I'm sick of copy/pasting chunks of code from previous scripts, and would like to learn doing it the "right way" with various modules for the various formats.
What do the wise monks think? Where can I find examples to get me started? Or am I overengineering this, and would a plain module without /Mo.*/ or /Class::.*/ be much simpler?
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |