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().
authorNicholas Clark <nick@ccl4.org>
Sun, 18 Dec 2011 16:21:14 +0000 (17:21 +0100)
committerNicholas Clark <nick@ccl4.org>
Mon, 19 Dec 2011 12:55:19 +0000 (13:55 +0100)
commit3a527656fd7999878fb0ad4e500f5c44148c5bd2
treedbb49e400e2357f8147c743fd81c34030f4a7a33
parent4027e27b35630b1e4213355d1223d476fa09a600
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.
pod/buildtoc