Skip Menu |

This queue is for tickets about the DBI CPAN distribution.

Report information
The Basics
Id: 2270
Status: resolved
Priority: 0/
Queue: DBI

People
Owner: Nobody in particular
Requestors: darren [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.35
Fixed in: (no value)



Subject: Small bug in code generated by DBI::DBD::Metadata::write_getinfo_pm
The DBD::$Driver::GetInfo code that DBI::DBD::Metadata::write_getinfo_pm writes contains a small error; part of the resulting code looks like: my $sql_ver_fmt = '%02d.%02d.%04d'; # ODBC version string: ##.##.##### my $sql_driver_ver = sprintf $sql_ver_fmt, split (/./, $DBD::Foo::VERSION); The split should read: split (/\./, $DBD::Foo::VERSION); Because this is being generated as part of an interpolated HEREDOC, the \ needs to be doubled. Patch attached.
--- /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/DBI/DBD/Metadata.pm Fri Mar 7 17:00:22 2003 +++ Metadata.pm Tue Mar 18 07:24:16 2003 @@ -138,7 +138,7 @@ my \$sql_driver = '${driver}'; my \$sql_ver_fmt = '%02d.%02d.%04d'; # ODBC version string: ##.##.##### -my \$sql_driver_ver = sprintf \$sql_ver_fmt, split (/\./, \$DBD::${driver}::VERSION); +my \$sql_driver_ver = sprintf \$sql_ver_fmt, split (/\\./, \$DBD::${driver}::VERSION); PERL my $kw_map = 0;
RT-Send-CC: dbi-users [...] perl.org
Thanks, applied. Tim. [DARREN - Fri Mar 21 07:22:08 2003]: Show quoted text
> The DBD::$Driver::GetInfo code that > DBI::DBD::Metadata::write_getinfo_pm > writes contains a small error; part of the resulting code looks like: > > my $sql_ver_fmt = '%02d.%02d.%04d'; # ODBC version string: > ##.##.##### > my $sql_driver_ver = sprintf $sql_ver_fmt, split (/./, > $DBD::Foo::VERSION); > > The split should read: > > split (/\./, $DBD::Foo::VERSION); > > Because this is being generated as part of an interpolated HEREDOC, > the \ needs to be doubled. Patch attached.