Up to this point, my perl experience has been largely in general scripting tasks and one large application. When DrZaius told me that my Find Ethernet Card Manufacturer script might be better as a module, I realized that this was an area in which I had little experience.

I've read the appropriate sections in the Camel book a couple of times, along with perlmod and perlmodlib and even browsed around CPAN a bit, thinking that they might at least have some guidelines for module creation. For the first time in my perl career, I am feeling rather dissatisfied with the documentation I've read.

For example, in the post mentioned above, DrZaius suggested that I include the mac address database into the __DATA__ section of a module. For the life of me, I can't seem to find any documentation about the __DATA__ section of a module.

I'm also curious about the ramifications of use and require statements, when it make more sense to use an object-oriented approach, etc.

Does you have any pointers to resources that might help me explore this facet of perl? Or perhaps you think I'm making the topic overcomplicated and can enlighten me in that regard.


In reply to Module Creation by mvaline

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.