JAS,

Great post. At first I didn't think any of that was really relevent to my situation, but I started thinking about it and it didn't take long before I realized that it had everything to do with my module. I hadn't really considered the issues you're talking about, but after reading your post I have many new ideas.

Before I didn't think there was any reason to make my module OO, but now I can see that it might be the best way. In it's current form, a collection of related functions, it's impossible for my module to be stateless because there is data that needs to be accessible to multiple functions and that data is currently stored in module level lexicals -- so I guess OO is really the ideal way to implement the module in order to bundle the related data and functionality together.

I can clearly see, now, how implementing the module as a class will make it much more flexible.

Thanks for making the post, that information has already elevated my concept of how to do this kind of programming in Perl by leaps and bounds and will prove invaluable.

bart,

Thanks for the suggestion, but I'm way beyond that point by now thanks to the excellent help everyone has given me in their posts here.

P.S. I don't really think File::Find makes a very good example for implementation.

Thanks,
JMM


In reply to Re: Packages and modules by Anonymous Monk
in thread Packages and modules by Anonymous Monk

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.