Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I'm looking for suggestions or thoughts on the best way of handling this, as it isn't something I've personally run into, and I haven't been able to find much regarding it.

I've come across a module in CPAN that I really like, however it's written in as a very procedural module, even though it seems like a great candidate for OO to me. Additionally, it would integrate much cleaner into some other stuff I'm doing if it were an OO module.

I'm willing to do the work to write an OO version of the module. My question is, what is the best way to go about this? Specifically, I'd love to hear thoughts and suggestions on:

  • Should I contact the author of the existing module and try to get the OO interface integrated into the existing package?
  • Is it better to just create a totally separate module? Looking at the code for the existing module, it may be difficult to implement it as a wrapper around the existing module, so it would possibly entail duplicating the functionality, and tracking any enhancements or changes made between the two.
  • If the best solution is a separate module, what is the best way to name it? Match the existing module and add an OO suffix (Foo::Bar::OO or Foo::BarOO)? Or something else?

Any other suggestions, thoughts, or tips would be great appreciated.

In reply to Best Practices for creating an OO version of an existing CPAN module? by topher

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (3)
    As of 2020-02-22 10:50 GMT
    Find Nodes?
      Voting Booth?
      What numbers are you going to focus on primarily in 2020?

      Results (99 votes). Check out past polls.