Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Changing API's of CPAN modules

by GrandFather (Saint)
on Aug 14, 2014 at 03:39 UTC ( [id://1097377]=note: print w/replies, xml ) Need Help??


in reply to Re: Changing API's of CPAN modules
in thread Changing API's of CPAN modules

Instead of having one module provide both APIs, you could provide a new module for the new API and either use the old module under the hood, or refactor the common code out of the old module and both variants of the module use the worker module under the hood.

If your module is OO (::new implies it is) provide a different constructor for each API variant. Your module code can then use any applicable common code and people get to choose to use the new API if they want.

Perl is the programming world's equivalent of English

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-20 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found