Skip to content

Commit 8ddf9c1

Browse files
committed
Make win32tzlist.pl checkable again
Commit 1301c80 removed some infrastructure needed to check windows-oriented perl scripts. It also removed most such scripts, but this one was left over. We repair the damage by making Win32::Registry a conditional requirement that is only loaded on Windows. With this change `perl -cw win32tzlist.pl` once again passes on non-Windows machines. Discussion: https://postgr.es/m/a2bd77fd-61b8-4c2b-b12e-3e22ae260f82@eisentraut.org
1 parent 8793c60 commit 8ddf9c1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/tools/win32tzlist.pl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,18 @@
1818
use strict;
1919
use warnings;
2020

21-
use Win32::Registry;
21+
use Config;
22+
23+
our $HKEY_LOCAL_MACHINE;
24+
25+
BEGIN
26+
{
27+
if ($Config{osname} eq 'MSWin32' || $Config{osname} eq 'msys')
28+
{
29+
require Win32::Registry;
30+
Win32::Registry->import;
31+
}
32+
}
2233

2334
my $tzfile = 'src/bin/initdb/findtimezone.c';
2435

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy