Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 32248
Status: resolved
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: bernie [...] rev.net
Cc:
AdminCc:

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



CC: bernie [...] rev.net
Subject: Disabluing custom sources
Date: Fri, 11 Jan 2008 09:22:19 -0500
To: bug-cpanplus [...] rt.cpan.org
From: "Bernie Cosell" <bernie [...] rev.net>
Hi! CPANPLUS is a wonderful package, but I'm running into tiny annoyance: every time I do anything with the package it nags me with a message about custom sources. For example: $ cpanp.pl [MSG] No '/staff/bernie/.cpanplus/custom-sources' dir, skipping custom sources [MSG] No '/staff/bernie/.cpanplus/custom-sources' dir, skipping custom sources File::Find -> Call func for every item in a directory tree CPAN version: 1.12 I'm writing a general utility that'll be used by several folk on the tech staff and it'd be nice if it was "self contained" and quiet. [that is, I'd very much like the 'MSG' to go away, but I also really don't want my program to work erratically if one of the users happens to have already had a .cpanplus/custom-sources directory]. Is there some config setting or something that'd turn off the 'custom sources' machinery entirely? [basically, at this stage I'm just trying to write a program to poke at CPAN that's as quiet and well-behaved and self contained as "wget -q URL".] THANKS! /Bernie\ -- Bernie Cosell RevNet Technologies mailto:bernie@rev.net Roanoke, VA
Subject: Re: [rt.cpan.org #32248] Disabluing custom sources
Date: Fri, 11 Jan 2008 16:38:37 +0100
To: bug-CPANPLUS [...] rt.cpan.org
From: "Jos I. Boumans" <jos [...] dwim.org>
On 11 Jan 2008, at 15:23, Bernie Cosell via RT wrote: Show quoted text
> CPANPLUS is a wonderful package, but I'm running into tiny annoyance: > every time I do anything with the package it nags me with a message > about custom sources. For example: > > $ cpanp.pl > [MSG] No '/staff/bernie/.cpanplus/custom-sources' dir, skipping custom > sources > [MSG] No '/staff/bernie/.cpanplus/custom-sources' dir, skipping custom > sources > File::Find -> Call func for every item in a directory tree > CPAN version: 1.12 > > I'm writing a general utility that'll be used by several folk on the > tech staff and it'd be nice if it was "self contained" and quiet. > [that is, I'd very much like the 'MSG' to go away, but I also really > don't want my program to work erratically if one of the users happens > to have already had a .cpanplus/custom-sources directory]. Is there > some config setting or something that'd turn off the 'custom sources' > machinery entirely?
Not currently, but it'd be quite possible to add that in of course. In the meantime, just to get rid of the print statement, you can go into lib/CPANPLUS/Internals/Source.pm around line 1183: unless( IS_DIR->( $dir ) ) { msg(loc("No '%1' dir, skipping custom sources", $dir)); return; } and change the msg(..) line to: msg(loc("No '%1' dir, skipping custom sources", $dir),0); I'll also take a look if that msg should be printed at all times, as it's mostly interesting as a start up log, which we usually quell anyway. Anyway, thanks for reporting, i'll look into this a bit more :) -- Jos Boumans How do I prove I'm not crazy to people who are?
On Fri Jan 11 10:39:23 2008, jos@dwim.org wrote: Show quoted text
>> Is there some config setting or something that'd turn off the 'custom sources'
> > machinery entirely?
> > Not currently, but it'd be quite possible to add that in of course.
As of 0.86 (not yet released), you'll be able to do: s conf enable_custom_sources 0 from the default shell to disable custom sources. It'll be on by default. Thanks for reporting, Jos