Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Minor API changes in 10-year-old module

by holli (Abbot)
on Sep 05, 2019 at 20:24 UTC ( [id://11105684]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Minor API changes in 10-year-old module
in thread Minor API changes in 10-year-old module

Well, you can. It's more work but you could make this first new version behave like the old version, with aformentioned warnings, but also support the fixed API when they use it with use Module qw(:always-die); or use Module qw(:newapi); or whatever. Then your next version can switch to new api and silently ignore that flag.


holli

You can lead your users to water, but alas, you cannot drown them.

Replies are listed 'Best First'.
Re^4: Minor API changes in 10-year-old module
by Tux (Canon) on Sep 06, 2019 at 10:28 UTC

    If the new API is (clearly) better, I'd reverse that and add use Some::Module qw( API2009 ); and have a few wrapper functions that are backward compatible. The docs can then say that this possibility will be removed in version x.yy or from 2020-09-10 forward.

    As a side note: there is absolutely no need for a return immediately following a croak. The croak will exit the current scope immediately causing the return to never execute. Code like that is misleading and wrong.


    Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

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

    No recent polls found