Skip Menu |

This queue is for tickets about the Class-Factory-Util CPAN distribution.

Report information
The Basics
Id: 3278
Status: resolved
Priority: 0/
Queue: Class-Factory-Util

People
Owner: DROLSKY [...] cpan.org
Requestors: spoon [...] cpan.org
Cc:
AdminCc:

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



Date: Mon, 18 Aug 2003 17:30:51 +1000
To: bug-class-factory-util [...] rt.cpan.org
Subject: Find subclasses in @INC
From: Iain Truskett <spoon [...] cpan.org>
Heyo, I was contemplating whether to use Class::Factory::Util for DTF::Builder but found you don't look very far for subclasses. The attached patch makes searching look in @INC as well as where the module came from. cheers, -- Iain.

Message body is not shown because sender requested not to inline it.

Date: Sat, 23 Aug 2003 21:04:25 -0500 (CDT)
From: Dave Rolsky <autarch [...] urth.org>
To: Iain Truskett via RT <bug-Class-Factory-Util [...] rt.cpan.org>
Subject: Re: [cpan #3278] Find subclasses in @INC
RT-Send-Cc:
On Mon, 18 Aug 2003, Iain Truskett via RT wrote: Show quoted text
> I was contemplating whether to use Class::Factory::Util for DTF::Builder > but found you don't look very far for subclasses. > > The attached patch makes searching look in @INC as well as where the > module came from.
I applied it. I'll try uploading it to PAUSE but it may still be broken. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/
Let's not forget about PERL5LIB and PERLLIB, something along these lines (ps , on win32 perllib is treated like path): require File::Spec; for my $i( $ENV{PERL5LIB}, $ENV{PERLLIB} ){ next unless defined $i and length $i; if( $^O =~ /win32/i ){ require Config; my $sep = quotemeta $Config::Config{path_sep}; for my $p( grep length, split /$sep/, $i){ push @theINC, File::Spec->canonpath($p); } } else { push @theINC, File::Spec->canonpath($i); } } }
RT-Send-CC: podmaster [...] cpan.org, spoon [...] cpan.org
[PODMASTER - Sun Aug 24 08:22:31 2003]: Show quoted text
> Let's not forget about PERL5LIB and PERLLIB,
Why? The appropriate one will already be in @INC and correctly parsed. There's no need to scan it twice. Also, if PERL5LIB is set, PERLLIB should be ignored. I can see a case for using File::Spec to fiddle with the paths though. cheers, -- Iain.
Show quoted text
> > Let's not forget about PERL5LIB and PERLLIB,
> > Why? The appropriate one will already be in @INC and correctly > parsed. There's no need to scan it twice. > > Also, if PERL5LIB is set, PERLLIB should be ignored.
whoops, I guess it's been a while since I read `perldoc perlrun' Show quoted text
> I can see a case for using File::Spec to fiddle with the > paths though.
portability++