return if ($_ =~ m/\.(ico|bin|po|key)$/);
my @lines;
- tie @lines, 'Tie::File', $File::Find::name;
+ tie @lines, "Tie::File", $File::Find::name;
# We process all lines because some files have copyright
# strings embedded in them, e.g. src/bin/psql/help.c
'format:s' => \$format,
'libname:s' => \$libname,
'input:s' => \$input,
- 'output:s' => \$output) or die 'wrong arguments';
+ 'output:s' => \$output) or die "wrong arguments";
if (not( $format eq 'darwin'
or $format eq 'gnu'
if ($format eq 'gnu')
{
- print $output_handle '{
+ print $output_handle "{
global:
-';
+";
}
elsif ($format eq 'win')
{
if ($format eq 'gnu')
{
- print $output_handle ' local: *;
+ print $output_handle " local: *;
};
-';
+";
}
# Emit the definition of the hash function.
-my $funcname = $varname . '_hash_func';
+my $funcname = $varname . "_hash_func";
my $f = PerfectHash::generate_hash_function(\@keywords, $funcname,
case_fold => $case_fold);
# Emit the struct that wraps all this lookup info into one variable.
-printf $kwdef 'static ' if !$extern;
+printf $kwdef "static " if !$extern;
printf $kwdef "const ScanKeywordList %s = {\n", $varname;
printf $kwdef qq|\t%s_kw_string,\n|, $varname;
printf $kwdef qq|\t%s_kw_offsets,\n|, $varname;
next unless $pieces[6];
# Skip externs used from another compilation unit
- next if ($pieces[2] eq 'UNDEF');
+ next if ($pieces[2] eq "UNDEF");
# Skip static symbols
- next unless ($pieces[4] eq 'External');
+ next unless ($pieces[4] eq "External");
# Skip some more MSVC-generated crud
next if $pieces[6] =~ /^@/;
# Strip the leading underscore for win32, but not x64
$f =~ s/^_//
- unless ($arch eq 'x86_64');
+ unless ($arch eq "x86_64");
# Emit just the name if it's a function symbol, or emit the name
# decorated with the DATA option for variables.
my $cmd = "dumpbin /nologo /symbols /out:$tmpfile " . join(' ', @files);
-system($cmd) == 0 or die 'Could not call dumpbin';
+system($cmd) == 0 or die "Could not call dumpbin";
rename($tmpfile, $symfile) or die $!;
extract_syms($symfile, \%def);
print "\n";
writedef($deffile, $arch, \%def);
-print 'Generated ' . scalar(keys(%def)) . " symbols\n";
+print "Generated " . scalar(keys(%def)) . " symbols\n";
{
$dotneeded = 1;
}
-elsif ($minor eq 'devel')
+elsif ($minor eq "devel")
{
$dotneeded = 0;
}
# Create various required forms of the version number
if ($dotneeded)
{
- $fullversion = $majorversion . '.' . $minor;
+ $fullversion = $majorversion . "." . $minor;
}
else
{
# Get the autoconf version number for eventual nag message
# (this also ensures we're in the right directory)
-my $aconfver = '';
-open(my $fh, '<', 'configure.ac') || die "could not read configure.ac: $!\n";
+my $aconfver = "";
+open(my $fh, '<', "configure.ac") || die "could not read configure.ac: $!\n";
while (<$fh>)
{
if (m/^m4_if\(m4_defn\(\[m4_PACKAGE_VERSION\]\), \[(.*)\], \[\], \[m4_fatal/
}
}
close($fh);
-$aconfver ne ''
+$aconfver ne ""
|| die "could not find autoconf version number in configure.ac\n";
# Update configure.ac and other files that contain version numbers
-my $fixedfiles = '';
+my $fixedfiles = "";
-sed_file('configure.ac',
+sed_file("configure.ac",
"-e 's/AC_INIT(\\[PostgreSQL\\], \\[[0-9a-z.]*\\]/AC_INIT([PostgreSQL], [$fullversion]/'"
);
-sed_file('meson.build',
+sed_file("meson.build",
qq{-e "/^project(/,/^)/ s/ version: '[0-9a-z.]*',/ version: '$fullversion',/"}
);
sub sed_file
{
my ($filename, $sedargs) = @_;
- my ($tmpfilename) = $filename . '.tmp';
+ my ($tmpfilename) = $filename . ".tmp";
system("sed $sedargs $filename >$tmpfilename") == 0
or die "sed failed: $?";
#
my $basekey;
$HKEY_LOCAL_MACHINE->Open(
- 'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones', $basekey)
+ "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones", $basekey)
or die $!;
my @subkeys;