develooper Front page | perl.perl5.porters | Postings from February 2000

Re: use octets; and "escaping the piranha's"

From:
John L. Allen
Date:
February 11, 2000 10:49
Subject:
Re: use octets; and "escaping the piranha's"
Message ID:
Pine.SOL.3.91.1000211134242.6964A-100000@gateway.grumman.com


On Thu, 10 Feb 2000, Larry Wall wrote:

> japhy@pobox.com writes:
> : On Feb 10, Nathan Torkington said:
> : 
> : >Mark Mielke writes:
> : >> Haha... has anybody named a package like "Santa's::Helpers" before?
> : >> (That possibility having never crossed my mind)
> : >
> : >Mixing :: and ', no.  But Chris Nandor wrote the D'oh module, I
> : >believe.
> : 
> : I (kind of) like that fact that :: is translated to a /.  That way, I can
> : annoy people by doing stuff like
> : 
> :   use ::home::jeffp::my_modules::MyModule;
> : 
> : And they get puzzled.
> 
> That's sick.  I love it.

Me too.  Coincidently, I was just looking into this a few days ago, and saw 
that with perl5.004_04 at least, @INC appears to be searched:

  $ perl -e 'use ::a::b::c'
  Can't locate /a/b/c.pm in @INC (@INC contains: 
  /prod/free/lib/perl5/aix/5.00404 
  /prod/free/lib/perl5 /prod/free/lib/perl5/site_perl/aix 
  /prod/free/lib/perl5/sit
  e_perl .) at -e line 1.
  BEGIN failed--compilation aborted at -e line 1.

But with perl5.5.650 (and probably at some earlier point), @INC appears 
to be bypassed (hopefully because of the leading ::):

  $ perl -e 'use ::a::b::c'
  Can't locate /a/b/c.pm at -e line 1.
  BEGIN failed--compilation aborted at -e line 1.

This latter bahavior being just the one I wanted!

John.



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