|Subject:||Doesn't handle all cases of require hook?|
|X-Mailer:||MIME-tools 5.504 (Entity 5.504)|
The `require` section of perlfunc says: ... (e.g., "Foo/Bar.pm"). The subroutine should return either nothing or else a list of up to four values in the following order: 1 A reference to a scalar, containing any initial source code to prepend to the file or generator output. 2 A filehandle, from which the file will be read. 3 A reference to a subroutine. If there is no filehandle (previous item), then this subroutine is expected to generate one line of source code per call, writing the line into $_ and returning 1, then finally at end of file returning 0. If there is a filehandle, then the subroutine will be called to act as a simple source filter, with the line as read in $_. Again, return 1 for each valid line, and 0 after all lines have been returned. 4 Optional state for the subroutine. The state is passed in as $_. A reference to the subroutine itself is passed in as $_. ... It seems that check_install() only expects #2 (filehandle, $fh) from the hook. It doesn't handle the case when the source is being generated by #3 (subroutine), or a combination of #2 and #3 (where the lines from the filehandle might need to be filtered first by the subroutine).