Skip to content

Commit

Permalink
Do not use autodie in script
Browse files Browse the repository at this point in the history
This reduced the dependencies. See #359.
  • Loading branch information
oschwald committed Dec 9, 2024
1 parent cbcec4f commit 3a0ab7e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
pkillarjun. GitHub #357.
* Updated `cmake_minimum_required` to a version range to quiet deprecation
warnings on new CMake versions. Reported by gmou3. GitHub #359.
* The script for generating man pages no longer uses `autodie`. This
eliminates the dependency on `IPC::System::Simple`. Reported by gmou3.
GitHub #359.

## 1.11.0 - 2024-08-21

Expand Down
15 changes: 8 additions & 7 deletions dev-bin/make-man-pages.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use strict;
use warnings;
use autodie qw( :all );

use FindBin qw( $Bin );

Expand Down Expand Up @@ -54,7 +53,7 @@ sub _make_man {
'-M', "section:$section",
$input,
'-o', $output,
);
) == 0 or die "Failed to run pandoc: $!";
_pandoc_postprocess($output);
}
elsif ( $translator eq 'lowdown' ) {
Expand All @@ -67,7 +66,7 @@ sub _make_man {
'-M', "section:$section",
$input,
'-o', $output,
);
) == 0 or die "Failed to run lowdown: $!";
}
}

Expand All @@ -76,9 +75,11 @@ sub _make_lib_man_links {

my $header = read_file("$Bin/../include/maxminddb.h");
for my $proto ( $header =~ /^ *extern.+?(MMDB_\w+)\(/gsm ) {
open my $fh, '>', "$target/man/man3/$proto.3";
print {$fh} ".so man3/libmaxminddb.3\n";
close $fh;
open my $fh, '>', "$target/man/man3/$proto.3"
or die "Failed to open file: $!";
print {$fh} ".so man3/libmaxminddb.3\n"
or die "Failed to write to file: $!";
close $fh or die "Failed to close file: $!";
}
}

Expand All @@ -92,7 +93,7 @@ sub _pandoc_postprocess {
s/^\.IP\n\.nf/.IP "" 4\n.nf/gm;
s/(Automatically generated by Pandoc)(.+)$/$1/m;
},
$file
$file,
);
}

Expand Down

0 comments on commit 3a0ab7e

Please sign in to comment.