develooper Front page | perl.perl5.porters | Postings from December 2013

[perl #120687] base.pm confused by newline in @INC

From:
Tony Cook via RT
Date:
December 17, 2013 00:33
Subject:
[perl #120687] base.pm confused by newline in @INC
Message ID:
rt-4.0.18-22749-1387240393-1728.120687-15-0@perl.org
On Mon Dec 09 19:12:05 2013, jkeenan wrote:
> On Wed Dec 04 14:38:22 2013, xdg@xdg.me wrote:
> > On Wed, Dec 4, 2013 at 1:28 PM, Johan Vromans <jvromans@squirrel.nl>
> > wrote:
> > > This is just working around the real problem: the lack of a good
> > > API for
> > > module finding/loading/checking etc.
> >
> > Actually, I think it's working around the *other* real problem: the
> > lack of a good API for errors and thus the reliance on string
> > processing on $@.
> >
> > Though I agree 99% about module loading, too.  But as Zefram points
> > out, it doesn't help legacy Perls any.
> >
> > David
> >
> 
> 
> A patch has been submitted in RT #120685 which is intended to apply to
> this ticket as well.  See:
> https://rt.perl.org/Ticket/Display.html?id=120685#txn-1271358

I've applied that patch and I did a quick test, before the change:

tony@mars:.../git/perl2$ ./perl -Ilib -e 'package Foo; sub x; package main ; BEGIN { push @INC, "/home/\ntony"; } use base Foo;'
Can't locate Foo.pm in @INC (you may need to install the Foo module) (@INC contains: lib /usr/local/lib/perl5/site_perl/5.19.7/x86_64-linux /usr/local/lib/perl5/site_perl/5.19.7 /usr/local/lib/perl5/5.19.7/x86_64-linux /usr/local/lib/perl5/5.19.7 . /home/
tony) at (eval 2) line 2.
        ...propagated at lib/base.pm line 90.
BEGIN failed--compilation aborted at -e line 1.

after the change:

tony@mars:.../git/perl2$ ./perl -Ilib -e 'package Foo; sub x; package main ; BEGIN { push @INC, "/home/\ntony"; } use base Foo;'
(no output)

So I'm closing this ticket.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=120687



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About