From 5a6ebf5f1bade18766ab23840c650c33987032be Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 13 Dec 2011 15:16:37 +0000 Subject: installman only needs match =head1 to identify files with Pod. Commit 63fae90782a9851d made installman skip files which contained no Pod. However, the regex used, /^=(?:head\d+|item|pod)\b/ is overly permissive. All files with Pod actually match /^=head1\b/. Moreover, a Pod file which does not start with a =head1 is not going to generate a well formed man page. Hence restrict the files processed to those which are well formed. --- installman | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'installman') diff --git a/installman b/installman index 2c20790def..ef1470a1b4 100755 --- a/installman +++ b/installman @@ -157,7 +157,7 @@ sub pod2man { local $_; while () { - ++$has_pod and last if /^=(?:head\d+|item|pod)\b/; + ++$has_pod and last if /^=head1\b/; } close T; @@ -223,3 +223,10 @@ sub rename { link($from,$to) || return 0; unlink($from); } + +# Local variables: +# cperl-indent-level: 4 +# indent-tabs-mode: nil +# End: +# +# ex: set ts=8 sts=4 sw=4 et: -- cgit v1.2.1