This queue is for tickets about the Module-Load-Conditional CPAN distribution.

Report information
The Basics

Nobody in particular

(no value)
Broken in:
(no value)
Fixed in:
(no value)

Subject: Doesn't handle all cases of require hook?
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1450
The `require` section of perlfunc says: ... (e.g., "Foo/"). 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 $_[1]. A reference to the subroutine itself is passed in as $_[0]. ... 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).

This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with to