Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 ( [id://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

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1020550]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-03-28 10:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found