A couple improvements to your general writing style:
package Name::Name; use 5.6.0; # Always specify the minimum Perl your code expects to work + with. use strict; # Got this right. use warnings FATAL => 'all'; # If you're 5.6+, this catches a lot of s +illy mistakes. our $VERSION = '0.05'; # If you're 5.6+, this is a nicer way of writin +g that VERSION stuff. # MY CODE HERE 1; __END__ # Always put this here to tell you that there can never be any + code after this.
That happens to be the template for whenever I start a new .pm or .pl file in vim (minus the comments, of course).

Now - why do you want to call the methods Foo->meth() vs. having it be a library of functions? I've always thought that the way File::Spec does this is really freaking annoying. If you're a library of functions, then provide the functions for export. If you're an OO module, then use Moose (or any of the other 1235123123 OO modules on CPAN) to provide the OO stuff, have your users receive an object, and call methods on that. Just because you can do something is a poor reason to actually do it, especially in production. KISS is a good motto.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

In reply to Re: Writing a Perl Module... problems by dragonchild
in thread Writing a Perl Module... problems by cosmicperl

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.