develooper Front page | perl.perl5.porters | Postings from May 2010

Re: Perl4 libs deprecation

Thread Previous
May 19, 2010 09:35
Re: Perl4 libs deprecation
Message ID:
Jesse Vincent wrote:
>I presume there's a good reason, but why not use the same 'use
>deprecate' idiom we did for all the other deprecated CPAN modules?

Both the logic that triggers the warning and the text of the warning
need to be different from what "use deprecate" does.  Fundamentally, "use
deprecate" is for .pm modules, and so isn't suitable for these .pl files.

"use deprecate" works from the caller's package, and appends ".pm",
to determine the relative filename it needs to search for.  Its error
message is generated from the package name.  In all of these respects
it will fail on the .pl files.

The warning for the .pl files needs to mention Perl4::CoreLibs, which
is the CPAN package name and the placeholder module that can be searched
for in the CPAN index.  Mentioning the .pl on its own wouldn't be enough
to install it from CPAN.

The logic could be generalised in a modular fashion, but it doesn't seem
worth the bother.  There isn't a practical problem in coordinating the
two distributions of the .pl files that would justify such contortions to
keep them byte-identical.  (In fact, they're already not byte-identical:
for the CPAN distribution I removed the *comments* that said "This legacy
library is deprecated and will be removed".)


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About