Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by BrowserUk (Pope)
on Feb 25, 2013 at 22:01 UTC ( #1020580=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Best Practices for creating an OO version of an existing CPAN module?
in thread Best Practices for creating an OO version of an existing CPAN module?

the module is Net::Statsd. It uses a pair of package variables to set the destination host/port, and I have a need to for multiple separate destinations.

For that particular module, I agree an OO interface would seem like the best way to go.

As for how. The existing interface does not lend itself to being objectised without effectively re-writing the interface of every procedure. As such, I think you'd be better off using a completely separate package (say Net::Statsd::OO or similar) and just writing it from scratch. With reference to the existing; but without having it as a dependency.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^5: Best Practices for creating an OO version of an existing CPAN module?
Re^6: Best Practices for creating an OO version of an existing CPAN module?
by topher (Scribe) on Feb 28, 2013 at 05:52 UTC

    That's the direction I was leaning towards myself.

    I think I'll go ahead and ping the existing module's author, and then get started on rewriting things.

    Christopher Cashell

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1020580]
help
Chatterbox?
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 2015-07-04 07:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (58 votes), past polls