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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
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 |