Skip to content

Commit 83d0d6c

Browse files
committed
Make Changes match CPAN::Changes::Spec
• generate DBI::Changes.pm from Changes
1 parent 479ff8c commit 83d0d6c

File tree

13 files changed

+11169
-181
lines changed

13 files changed

+11169
-181
lines changed

Changes

Lines changed: 139 additions & 160 deletions
Large diffs are not rendered by default.

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ lib/DBD/Mem.pm A pure-perl in-memory driver using DBI::DBD::Sql
4545
lib/DBD/NullP.pm An empty example Driver module
4646
lib/DBD/Proxy.pm Proxy driver
4747
lib/DBD/Sponge.pm A driver for fake cursors (precached data)
48+
lib/DBI/Changes.pm
4849
lib/DBI/Const/GetInfo/ANSI.pm GetInfo data based on ANSI standard
4950
lib/DBI/Const/GetInfo/ODBC.pm GetInfo data based on ODBC standard
5051
lib/DBI/Const/GetInfoReturn.pm GetInfo return values plus tools based on standards

MANIFEST.SKIP

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
\.[co]$
2222
^appveyor\.yml
2323
^blib/
24+
^changes2pm\.pl
2425
^DBI-\d
2526
^dbi.tiddlyspot.com.html
2627
^dbilogstrip$

Makefile.PL

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,9 @@ dbixs_rev.h: DBIXS.h Driver_xst.h dbipport.h dbivport.h dbixs_rev.pl
347347
DBI.c: Perl$(OBJ_EXT)
348348
349349
# make Changes file available as installed pod docs "perldoc DBI::Changes"
350-
inst_libdbi = ' . File::Spec->catdir($self->{INST_LIB}, 'DBI') . '
351-
changes_pm = ' . File::Spec->catfile($self->{INST_LIB}, 'DBI', 'Changes.pm') . '
350+
inst_libdbi = ' . File::Spec->catdir ($self->{INST_LIB}, 'DBI') . '
351+
changes_pm1 = ' . File::Spec->catfile ('lib', 'DBI', 'Changes.pm') . '
352+
changes_pm2 = ' . File::Spec->catfile ($self->{INST_LIB}, 'DBI', 'Changes.pm') . '
352353
'.q{
353354
354355
config :: $(changes_pm)
@@ -357,7 +358,8 @@ config :: $(changes_pm)
357358
$(changes_pm): Changes
358359
$(MKPATH) $(inst_libdbi)
359360
$(RM_F) $(changes_pm)
360-
$(CP) Changes $(changes_pm)
361+
perl changes2pm.pl
362+
$(CP) $(changes_pm1) $(changes_pm2)
361363
362364
ptest: all
363365
prove --blib --jobs 8 --shuffle
@@ -381,6 +383,9 @@ dbipport:
381383
ppport: dbipport.h
382384
perl dbipport.h --compat-version=5.8.0 DBI.xs
383385
386+
lib/DBI/Changes.pm: Changes
387+
perl changes2pm.pl
388+
384389
checkpod:
385390
$(RM_RF) blib
386391
find . -type f \( -name .svn -prune -o -name \*.pm -o -name \*.PL -o -name \*.pl \) \

changes2pm.pl

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
#!/pro/bin/perl
2+
3+
use 5.014002;
4+
use warnings;
5+
6+
our $VERSION = "0.01 - 20240825";
7+
our $CMD = $0 =~ s{.*/}{}r;
8+
9+
sub usage {
10+
my $err = shift and select STDERR;
11+
say "usage: $CMD ...";
12+
exit $err;
13+
} # usage
14+
15+
use autodie;
16+
use Getopt::Long qw(:config bundling);
17+
GetOptions (
18+
"help|?" => sub { usage (0); },
19+
"V|version" => sub { say "$CMD [$VERSION]"; exit 0; },
20+
21+
"v|verbose:1" => \(my $opt_v = 0),
22+
) or usage (1);
23+
24+
open my $ph, ">:encoding(utf-8)", "lib/DBI/Changes.pm";
25+
open my $ch, "<:encoding(utf-8)", "Changes";
26+
27+
my @m = qw( - Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec );
28+
my @chg;
29+
while (<$ch>) {
30+
s/[\s\r\n]+\z//;
31+
if (s/^([0-9]+(?:\.[.0-9]+))\s+//) {
32+
my ($v, $dt, $svn) = ($1);
33+
if (s/^[-,\s]*([0-9]{4})-([0-9]{2})-([0-9]{2})[-,\s]*//) {
34+
$dt = "$3 $m[$2] $1";
35+
}
36+
else {
37+
$dt = "TBD";
38+
}
39+
s/\s*\(?\s*svn\s+(?:rev |r)([0-9]+)\s*\)\s*$// and $svn = $1;
40+
push @chg => [ $v, $dt, $_, $svn || "" ];
41+
next;
42+
}
43+
push @{$chg[-1]} => $_;
44+
}
45+
close $ch;
46+
47+
print $ph <<"EOH";
48+
#!/usr/bin/perl
49+
50+
use strict;
51+
use warnings;
52+
53+
1;
54+
55+
__END__
56+
=head1 NAME
57+
58+
DBI::Changes - List of significant changes to the DBI
59+
60+
=encoding UTF-8
61+
62+
EOH
63+
64+
foreach my $c (@chg) {
65+
my @c = @$c;
66+
my ($vsn, $date, $author, $svn) = splice @c, 0, 4;
67+
$svn =~ s/([0-9]+)/ (svn rev $1)/;
68+
say $ph "=head2 Changes in DBI $vsn$svn - $date";
69+
say $ph "";
70+
shift @c while @c && $c[ 0] !~ m/\S/;
71+
pop @c while @c && $c[-1] !~ m/\S/;
72+
if ($c[0] =~ s/^\s*\K(\*|\x{2022})\s*//) {
73+
my @i = [ pop @c ];
74+
while (@c) {
75+
if ($c[0] =~ s/^\s*\K(\*|\x{2022})\s*//) {
76+
push @i => [ shift @c ]
77+
}
78+
else {
79+
push @{$i[-1]} => shift @c;
80+
}
81+
}
82+
say $ph "=over 2";
83+
for (@i) {
84+
say $ph "";
85+
say $ph "=item *";
86+
say $ph "";
87+
say $ph s/^\s+//r for @$_;
88+
}
89+
90+
say $ph "";
91+
say $ph "=back";
92+
}
93+
else {
94+
say $ph $_ for @c;
95+
}
96+
say $ph "";
97+
}
98+
99+
print $ph <<"EOF";
100+
=head1 ANCIENT HISTORY
101+
102+
12th Oct 1994: First public release of the DBI module.
103+
(for Perl 5.000-beta-3h)
104+
105+
19th Sep 1994: DBperl project renamed to DBI.
106+
107+
29th Sep 1992: DBperl project started.
108+
109+
=cut
110+
EOF

doc/DBI.3

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
.\" ========================================================================
5959
.\"
6060
.IX Title "DBI 3"
61-
.TH DBI 3 2024-08-23 "perl v5.40.0" "User Contributed Perl Documentation"
61+
.TH DBI 3 2024-08-25 "perl v5.40.0" "User Contributed Perl Documentation"
6262
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
6363
.\" way too many mistakes in technical documents.
6464
.if n .ad l
@@ -6834,17 +6834,17 @@ Security, especially the "SQL Injection" attack:
68346834
.Ve
68356835
.SS FAQ
68366836
.IX Subsection "FAQ"
6837-
See <http://faq.dbi\-support.com/>
6837+
See <http://dbi.perl.org/support/>
68386838
.SH AUTHORS
68396839
.IX Header "AUTHORS"
6840-
DBI by Tim Bunce, <http://www.tim.bunce.name>
6840+
DBI by Tim Bunce (1994\-2024), The DBI developer group (2024..)
68416841
.PP
68426842
This pod text by Tim Bunce, J. Douglas Dunlop, Jonathan Leffler and others.
68436843
Perl by Larry Wall and the \f(CW\*(C`perl5\-porters\*(C'\fR.
68446844
.SH COPYRIGHT
68456845
.IX Header "COPYRIGHT"
68466846
The DBI module is Copyright (c) 1994\-2024 Tim Bunce. Ireland.
6847-
All rights reserved.
6847+
The DBI developer group (2024\-2024) All rights reserved.
68486848
.PP
68496849
You may distribute under the terms of either the GNU General Public
68506850
License or the Artistic License, as specified in the Perl 5.10.0 README file.
@@ -6895,8 +6895,7 @@ A couple of specific DBI features have been sponsored by enlightened companies:
68956895
.PP
68966896
The development of the \fBswap_inner_handle()\fR method was sponsored by BizRate.com (<http://BizRate.com>)
68976897
.PP
6898-
The development of DBD::Gofer and related modules was sponsored by
6899-
Shopzilla.com (<http://Shopzilla.com>), where I currently work.
6898+
The development of DBD::Gofer and related modules was sponsored by Shopzilla.com (https::connexity.com).
69006899
.SH CONTRIBUTING
69016900
.IX Header "CONTRIBUTING"
69026901
As you can see above, many people have contributed to the DBI and

doc/DBI.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4505,17 +4505,17 @@ <h2 id="Assorted-Related-Links">Assorted Related Links</h2>
45054505

45064506
<h2 id="FAQ">FAQ</h2>
45074507

4508-
<p>See <a href="http://faq.dbi-support.com/">http://faq.dbi-support.com/</a></p>
4508+
<p>See <a href="http://dbi.perl.org/support/">http://dbi.perl.org/support/</a></p>
45094509

45104510
<h1 id="AUTHORS">AUTHORS</h1>
45114511

4512-
<p>DBI by Tim Bunce, <a href="http://www.tim.bunce.name">http://www.tim.bunce.name</a></p>
4512+
<p>DBI by Tim Bunce (1994-2024), The DBI developer group (2024..)</p>
45134513

45144514
<p>This pod text by Tim Bunce, J. Douglas Dunlop, Jonathan Leffler and others. Perl by Larry Wall and the <code>perl5-porters</code>.</p>
45154515

45164516
<h1 id="COPYRIGHT">COPYRIGHT</h1>
45174517

4518-
<p>The DBI module is Copyright (c) 1994-2024 Tim Bunce. Ireland. All rights reserved.</p>
4518+
<p>The DBI module is Copyright (c) 1994-2024 Tim Bunce. Ireland. The DBI developer group (2024-2024) All rights reserved.</p>
45194519

45204520
<p>You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl 5.10.0 README file.</p>
45214521

@@ -4545,7 +4545,7 @@ <h1 id="ACKNOWLEDGEMENTS">ACKNOWLEDGEMENTS</h1>
45454545

45464546
<p>The development of the swap_inner_handle() method was sponsored by BizRate.com (<a href="http://BizRate.com">http://BizRate.com</a>)</p>
45474547

4548-
<p>The development of DBD::Gofer and related modules was sponsored by Shopzilla.com (<a href="http://Shopzilla.com">http://Shopzilla.com</a>), where I currently work.</p>
4548+
<p>The development of DBD::Gofer and related modules was sponsored by Shopzilla.com (<a>https::connexity.com</a>).</p>
45494549

45504550
<h1 id="CONTRIBUTING">CONTRIBUTING</h1>
45514551

doc/DBI.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6181,19 +6181,19 @@ Security, especially the "SQL Injection" attack:
61816181

61826182
## FAQ
61836183

6184-
See [http://faq.dbi-support.com/](http://faq.dbi-support.com/)
6184+
See [http://dbi.perl.org/support/](http://dbi.perl.org/support/)
61856185

61866186
# AUTHORS
61876187

6188-
DBI by Tim Bunce, [http://www.tim.bunce.name](http://www.tim.bunce.name)
6188+
DBI by Tim Bunce (1994-2024), The DBI developer group (2024..)
61896189

61906190
This pod text by Tim Bunce, J. Douglas Dunlop, Jonathan Leffler and others.
61916191
Perl by Larry Wall and the `perl5-porters`.
61926192

61936193
# COPYRIGHT
61946194

61956195
The DBI module is Copyright (c) 1994-2024 Tim Bunce. Ireland.
6196-
All rights reserved.
6196+
The DBI developer group (2024-2024) All rights reserved.
61976197

61986198
You may distribute under the terms of either the GNU General Public
61996199
License or the Artistic License, as specified in the Perl 5.10.0 README file.
@@ -6248,8 +6248,7 @@ A couple of specific DBI features have been sponsored by enlightened companies:
62486248

62496249
The development of the swap\_inner\_handle() method was sponsored by BizRate.com ([http://BizRate.com](http://BizRate.com))
62506250

6251-
The development of DBD::Gofer and related modules was sponsored by
6252-
Shopzilla.com ([http://Shopzilla.com](http://Shopzilla.com)), where I currently work.
6251+
The development of DBD::Gofer and related modules was sponsored by Shopzilla.com ([https::connexity.com](https://metacpan.org/pod/https%3A%3Aconnexity.com)).
62536252

62546253
# CONTRIBUTING
62556254

0 commit comments

Comments
 (0)