develooper Front page | perl.perl5.porters | Postings from August 2001

Re: [PATCH] put useful info in %INC for files loaded by a hook in @INC

Thread Previous | Thread Next
Rafael Garcia-Suarez
August 28, 2001 05:38
Re: [PATCH] put useful info in %INC for files loaded by a hook in @INC
Message ID:

On 2001.08.28 14:24:13 +0200 Arthur Bergman wrote:
> 01-08-28 14.23, skrev Rafael Garcia-Suarez på
> följande:
> > I also briefly documented this in perlvar/%INC.
> > 
> > I'll add tests for this, but the fact that the tests do not run
> > on perl+stdio annoys me. (Simply returning *DATA from the hook may be
> > a solution.)
> Thanks applied, is the reference correct for objects or only for coderefs?

Objects, coderefs and arrayrefs.

> Why doesn't *DATA work in stdio?

Sorry, I've not been clear. The current tests (t/op/inccode.t) don't work
with stdio, only with perlio, because of the idiom:
	open $fh, '<', \$scalar
used to construct the filehandle to be returned from the subroutine put in

If I return *DATA instead of $fh, I think that the tests will work with
stdio. Problem : this will imply to use seek() on the DATA filehandle
and to delete the key '' from %INC after each test.

Rafael Garcia-Suarez

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About