|No such thing as a small change|
Re: How to use @INC coderef hooks (perldoc wrong)by LanX (Chancellor)
|on Apr 04, 2014 at 12:30 UTC||Need Help??|
same case, tried fiddling around with it and the documentation seems wrong.
but this is never the case, passing undef doesn't help.
The "previous item" always has to be a filehandle.
Otherwise the generator-callback "this subroutine" is never called.
Passing a dummy filehandle helps.
DARN! looking at this example Re: Cancel/no-op a require reveals the problem with the documentation.
In the hook you can either return FILEHANDLE, CODEREF; or return CODEREF; but the docs imply return undef, CODEREF; for the second case.
( addicted to the Perl Programming Language)