Skip to content

Commit 3c591f2

Browse files
committed
autodoc: Combine two variables that have same value
And use this for yet another instance, instead of repeating the string
1 parent 26f46c2 commit 3c591f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autodoc.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
# unlooked at
155155
my %protos;
156156

157-
my $link_text = "Described in";
157+
my $described_in = "Described in";
158158

159159
my $description_indent = 4;
160160
my $usage_indent = 3; # + initial verbatim block blank yields 4 total
@@ -1052,7 +1052,7 @@ ($$)
10521052
# deserving candidates.)
10531053
my $podname = $file =~ s!.*/!!r; # Rmv directory name(s)
10541054
$podname =~ s/\.pod//;
1055-
$text = "Described in L<$podname>.\n";
1055+
$text = "$described_in L<$podname>.\n";
10561056

10571057
# Keep track of all the pod files that we refer to.
10581058
push $described_elsewhere{$podname}->@*, $podname;
@@ -1350,7 +1350,7 @@ sub parse_config_h {
13501350
my $was = $docs{'api'}{$section}{$name}->{pod};
13511351
$was = "" unless $was;
13521352
chomp $was;
1353-
if ($was ne "" && $was !~ m/$link_text/) {
1353+
if ($was ne "" && $was !~ m/$described_in/) {
13541354
die "Multiple descriptions for $name\n"
13551355
. "The '$section' section contained\n'$was'";
13561356
}

0 commit comments

Comments
 (0)