On Fri Aug 10 09:56:01 2012, NEILB wrote:
Show quoted text> Sounds good.
>
> You could add new function names, and then support the old names for
> backwards
> compatibility, phasing them out in the same schedule you outlined.
In 0.36, I added validate_card() as the new name for validate().
Show quoted text> Maybe you could support both styles of export as well? If you write:
>
> use Business::CreditCard;
>
> Then you'd get all functions, as now. But if you write:
>
> use Business::CreditCard qw(validate);
>
> Then you'd only get the function you asked for.
>
> Not sure if there's a standard way to do this though
Actually, that's exactly how Exporter works.
Old interface, no incompatible changes (validate, cardtype and generate_last_digit are exported into your namespace):
use Business::CreditCard;
Declare you want nothing exported:
use Business::CreditCard ();
Declare you just want validate_card and cardtype:
use Business::CreditCard qw( validate_card cardtype );
Declare you want the future default ( validate_card, cardtype and receipt_cardtype );
use Business::CreditCard qw( :NEW );
Long-term, I plan to eventually stop exporting validate() by default (and everything else?), but as this is a backwards-incompatible change, it will be a while. In the mean-time, you can explicitly ask for what you want (or don't) exported as above.
Thanks!