Deleted Added
full compact
Pod.pm (1.1.1.2) Pod.pm (1.1.1.1)
1# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
2#
3# Licensed under the OpenSSL license (the "License"). You may not use
4# this file except in compliance with the License. You can obtain a copy
5# in the file LICENSE in the source distribution or at
6# https://www.openssl.org/source/license.html
7
8package OpenSSL::Util::Pod;

--- 39 unchanged lines hidden (view full) ---

48GLOB (a file handle). The result is given back as a hash table.
49
50The additional hash is for extra parameters:
51
52=over
53
54=item B<section =E<gt> N>
55
1# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
2#
3# Licensed under the OpenSSL license (the "License"). You may not use
4# this file except in compliance with the License. You can obtain a copy
5# in the file LICENSE in the source distribution or at
6# https://www.openssl.org/source/license.html
7
8package OpenSSL::Util::Pod;

--- 39 unchanged lines hidden (view full) ---

48GLOB (a file handle). The result is given back as a hash table.
49
50The additional hash is for extra parameters:
51
52=over
53
54=item B<section =E<gt> N>
55
56The value MUST be a number, and will be the man section number
57to be used with the given .pod file.
56The value MUST be a number, and will be the default man section number
57to be used with the given .pod file. This number can be altered if
58the .pod file has a line like this:
58
59
60 =for comment openssl_manual_section: 4
61
59=item B<debug =E<gt> 0|1>
60
61If set to 1, extra debug text will be printed on STDERR
62
63=back
64
65=back
66

--- 34 unchanged lines hidden (view full) ---

101 open $fh, $input or die "Trying to read $filename: $!\n";
102 print STDERR "DEBUG: Reading $input\n" if $defaults{debug};
103 $input = $fh;
104 }
105
106 my %podinfo = ( section => $defaults{section});
107 while(<$input>) {
108 s|\R$||;
62=item B<debug =E<gt> 0|1>
63
64If set to 1, extra debug text will be printed on STDERR
65
66=back
67
68=back
69

--- 34 unchanged lines hidden (view full) ---

104 open $fh, $input or die "Trying to read $filename: $!\n";
105 print STDERR "DEBUG: Reading $input\n" if $defaults{debug};
106 $input = $fh;
107 }
108
109 my %podinfo = ( section => $defaults{section});
110 while(<$input>) {
111 s|\R$||;
112 if (m|^=for\s+comment\s+openssl_manual_section:\s*([0-9])\s*$|) {
113 print STDERR "DEBUG: Found man section number $1\n"
114 if $defaults{debug};
115 $podinfo{section} = $1;
116 }
117
109 # Stop reading when we have reached past the NAME section.
110 last if (m|^=head1|
111 && defined $podinfo{lastsect}
112 && $podinfo{lastsect} eq "NAME");
113
114 # Collect the section name
115 if (m|^=head1\s*(.*)|) {
116 $podinfo{lastsect} = $1;

--- 33 unchanged lines hidden ---
118 # Stop reading when we have reached past the NAME section.
119 last if (m|^=head1|
120 && defined $podinfo{lastsect}
121 && $podinfo{lastsect} eq "NAME");
122
123 # Collect the section name
124 if (m|^=head1\s*(.*)|) {
125 $podinfo{lastsect} = $1;

--- 33 unchanged lines hidden ---