Subject: | Question about 'use Package::DeprecationManager' |
Date: | Tue, 17 Jan 2012 16:10:38 -0500 |
To: | bug-package-deprecationmanager [...] rt.cpan.org |
From: | Sullivan Beck <sbeck [...] cpan.org> |
|I'm using the cpan2rpm program to create RPMs for our site of perl
modules not distributed as part of RedHat (which is most of them). The
||cpan2rpm script understands dependencies pretty well, so it
understands that if I want to create an RPM for Package::Stash, it will
build in dependencies to the created RPM correctly. In order to do
this, it will first make sure that dependency modules are also
available, one of which is Package::DeprecationManager . So one of the
things that cpan2rpm does when creating the Package::Stash RPM is to
test that the Package::DeprecationModule module is loadable by running:
|
| use Package::DeprecationManager;
||||which of course fails since there is no |'-deprecations' argument
included. As a result, the cpan2rpm script fails.
So my question/request (which stems in part from my lack of familiarity
with this module) is: would it be possible to make the package NOT fail
if you load it without the '-deprecations' argument? Certainly it
wouldn't do anything useful, but it would solve this problem.
Since I'm sure that there are very valid reasons for not doing this, my
backup question is: what argument could I pass in that will work in all
cases without breaking something.
In other words, what string could I pass in as ARGUMENT which would
cause the following one-liner to work in all situations:
perl -e 'use Package::DeprecationManager ARGUMENT'
I'm not totally opposed to hacking the cpan2rpm script (actually, I've
been strongly considering doing so), and adding an argument to allow me
to add this) but I'm not sure what I can pass in that will work in all
cases.
Thanks for any guidance.