On 2001.08.28 14:24:13 +0200 Arthur Bergman wrote: > 01-08-28 14.23, skrev Rafael Garcia-Suarez på rgarciasuarez@free.fr > 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 @INC. 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 'Foo.pm' from %INC after each test. -- Rafael Garcia-SuarezThread Previous | Thread Next