Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Best Practices for creating an OO version of an existing CPAN module?

by blue_cowdawg (Monsignor)
on Feb 25, 2013 at 18:37 UTC ( #1020550=note: print w/replies, xml ) Need Help??


in reply to Best Practices for creating an OO version of an existing CPAN module?

      '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.

As BrowserUK pointed out is I'd be doing a consideration of the benefit of going OO with the module. Secondly I'd definitely contact the current maintainer if there is one to determine their interest first. Even though the majority of modules I write are OO in nature I'm not always 100% convinced that's the way to go every time.


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
  • Comment on Re: Best Practices for creating an OO version of an existing CPAN module?

Replies are listed 'Best First'.
Re^2: Best Practices for creating an OO version of an existing CPAN module?
by topher (Scribe) on Feb 25, 2013 at 20:33 UTC

    I've definitely considered that.

    While most of the modules I personally write tend to be OO these days, I have no problem at all using non-OO modules as long as it doesn't present limitations. I'm a huge fan of lazy coding and using someone else's code any chance I can (much love to CPAN), so I generally don't jump in to rewrite an existing module if I don't feel it's needed.

    In this case, as I mention in my reply to BrowserUK, the need for multiple "instances" and the use of package state variables is causing me some issues that an OO version of the module would seem to cleanly solve.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1020550]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2020-02-18 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (79 votes). Check out past polls.

    Notices?