This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In buildtoc, move the "has a NAME?" file check into podset().
Instead of opening each file to search for /^=head1\s+NAME\b/ within the
File::Find::find() callback, move the check to the main processing code in
podset(), where the file is already open. Seeking the file back to the start
is less costly than closing and subsequently reopening, and performing all the
reads at the same time reduces pressure on the OS disk cache.