Skip Menu |

This queue is for tickets about the Package-DeprecationManager CPAN distribution.

Report information
The Basics
Id: 74100
Status: resolved
Priority: 0/
Queue: Package-DeprecationManager

People
Owner: Nobody in particular
Requestors: sbeck [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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.
Subject: Re: [rt.cpan.org #74100] Question about 'use Package::DeprecationManager'
Date: Wed, 18 Jan 2012 09:57:36 -0600 (CST)
To: Sullivan Beck via RT <bug-Package-DeprecationManager [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Tue, 17 Jan 2012, Sullivan Beck via RT wrote: Show quoted text
> |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'
The argument should be "()". In fact, it should do this for all modules. If you just want to load something with minimal side effects, you need to pass an empty list. Maybe you can submit a patch upstream for cpan2rpm. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: Re: [rt.cpan.org #74100] Question about 'use Package::DeprecationManager'
Date: Wed, 18 Jan 2012 11:05:26 -0500
To: bug-Package-DeprecationManager [...] rt.cpan.org
From: sbeck [...] cpan.org
On 01/18/2012 10:57 AM, autarch@urth.org via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=74100> > > On Tue, 17 Jan 2012, Sullivan Beck via RT wrote: >
>> |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'
> The argument should be "()". > > In fact, it should do this for all modules. If you just want to load > something with minimal side effects, you need to pass an empty list. > > Maybe you can submit a patch upstream for cpan2rpm. > > > -dave > > /*============================================================ > http://VegGuide.org http://blog.urth.org > Your guide to all that's veg House Absolute(ly Pointless) > ============================================================*/ >
Thanks for the info.