Re: How to deprecate a module ?



[A complimentary Cc of this posting was sent to
Dominique Dumont
<dominique.dumont@xxxxxx>], who wrote in article <kgiy7q2h57m.fsf@xxxxxxxxxxxxxxxxxxxxxx>:
Ilya Zakharevich <nospam-abuse@xxxxxxxxx> writes:

I'd suggest the following:
- upload InlineX::C2XS to CPAN
- upload a new version of deprecated Inline::C2XS which will complain
loudly (warn or syslog) when used. It will also tell the user to use
the new InlineX::C2XS module.
- wait 2 or 3 months

Better make it 3 or 4 years.

This may be overkill as Inline::C2XS is only 6 months old.

Hard to tell: The reference point should be not the lifecycle of the
module, but the lifecycle of whatever uses the module...

Anyway, I do not remember situations where a deprecation cycle of less
than 3 years is beneficial; but my memory may be selective...

For best results, there should be a way to mark things as "obsolete";
such modules should have two properties:

a) if something depends on it, the dependency fetcher would fetch it
OK (with some warnings?);

b) it is not indexed "for human consumption".

On the other hand, a warning is too weak a deterrent for people to
update dependencies in "just a few years". So short of disabling the
old module, there is no way to FORCE things to update.

Unless something like

my $n = 'PERLMOD_USE_DEPRECATED_INLINE__C2XS';
die <<EOD unless $ENV{$n};
###
### The module ... have been renamed long ago.
### Update your dependencies to ... .
###
### To temporarily re-enable this obsolete name, setenv $n to TRUE
###
# code to inherit from the new name:

Ilya
.