Skip to content

Commit d744a4d

Browse files
committed
#78 and #80
1 parent 7a5cc2e commit d744a4d

File tree

7 files changed

+130
-61
lines changed

7 files changed

+130
-61
lines changed

Changes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
Change history for Perl extension PDF::Table.
22

3+
=== Version 1.007 (2025-03-19) (unreleased)
4+
5+
devtools/PDFversion.pl, devtools/TableBuild.pl, util/3_examples.pl
6+
Updated to modern Perl standards to make 1_pc.pl PerlCritic happy.
7+
8+
lib/PDF/Table.pm
9+
Permit 'trans' or 'transparent' background color (mostly for overriding
10+
a default bg color). Per #80 (reported by @az143).
11+
12+
lib/PDF/Table.pm, examples/colspan.pl
13+
Fix colspan interference with a header row. Add (commented out) test
14+
code to show effect in colspan example. Per #78 (reported and fix
15+
supplied by @BlueWlvrn).
16+
317
=== Version 1.006 (2024-03-21)
418

519
devtools/*

devtools/PDFversion.pl

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#!/usr/bin/perl
2+
use strict;
3+
use warnings;
4+
15
#my $ourLAST = 1; # T: change my $LAST_UPDATE to our $LAST_UPDATE
26

37
my $src = $ARGV[0]; # directory root to work in for this call
@@ -18,14 +22,15 @@ sub update_version {
1822

1923
my @types = ('pl', 'pm'); # places to look for pattern in
2024
my @read_only = (0, 0); # places to expect to be R/O
25+
my ($SRC, $IN, $OUT);
2126

2227
# open this directory for reading
23-
opendir(SRC, "$src") || die "unable to open dir '$src': $!";
28+
opendir($SRC, "$src") || die "unable to open dir '$src': $!";
2429

2530
my @dirList = ();
2631
my @fileList = ();
2732

28-
while ($entry = readdir(SRC)) {
33+
while ($entry = readdir($SRC)) {
2934
if ($entry eq '.' || $entry eq '..') { next; }
3035

3136
if (-d "$src\\$entry") {
@@ -42,10 +47,10 @@ sub update_version {
4247

4348
# done reading, so close directory
4449
# have list of files and subdirectories within this one
45-
closedir(SRC);
50+
closedir($SRC);
4651

4752
while ($name = shift(@fileList)) {
48-
if ($name =~ m/ - Copy/) { next; }
53+
if ($name =~ m/ - Copy/) { next; }
4954
# $name is full file path and name
5055
$ro_flag = 0;
5156
for (my $i=0; $i<scalar @types; $i++) {
@@ -55,24 +60,24 @@ sub update_version {
5560
# make Read-Write
5661
if ($ro_flag) { system("attrib -R $name"); }
5762

58-
unless (open(IN, "<$name")) {
63+
unless (open($IN, "<", $name)) {
5964
die "Unable to update $name with version\n";
6065
}
61-
unless (open(OUT, ">$outtemp")) {
66+
unless (open($OUT, ">", $outtemp)) {
6267
die "Unable to open temporary output file $outtemp\n";
6368
}
6469

65-
while ($line = <IN>) {
70+
while ($line = <$IN>) {
6671
# $line still has line-end \n
6772
$line =~ s/$pattern/$newVer/;
6873
#if ($ourLAST) {
6974
# $line =~ s/^my \$LAST_UPDATE/our \$LAST_UPDATE/;
7075
#}
71-
print OUT $line;
76+
print $OUT $line;
7277
}
7378

74-
close(IN);
75-
close(OUT);
79+
close($IN);
80+
close($OUT);
7681
$outtemp =~ s#/#\\#g;
7782
$name =~ s#/#\\#g;
7883
system("copy $outtemp $name");
@@ -87,4 +92,5 @@ sub update_version {
8792
update_version($entry);
8893
}
8994

95+
return;
9096
}

0 commit comments

Comments
 (0)