Skip Menu |

This queue is for tickets about the DBD-ODBC CPAN distribution.

Report information
The Basics
Id: 50722
Status: resolved
Priority: 0/
Queue: DBD-ODBC

People
Owner: Nobody in particular
Requestors: bohica [...] ntlworld.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.23_1



Subject: Update to latest ppport.h (see perl ppport.h dbdimp.c) and add ppport.h to the DBD::ODBC distribution.
Update to latest ppport.h (see perl ppport.h dbdimp.c) and add ppport.h to the DBD::ODBC distribution. 1 #!/pro/bin/perl 2 3 use strict; 4 use warnings; 5 6 use Devel::PPPort; 7 use File::Copy; 8 9 # Check to see if ppport needs updating 10 my $ph = "ppport.h"; 11 12 my ($cv) = (qx{perl $ph --version} =~ m{\b([0-9]\.\w+)}); 13 if ($Devel::PPPort::VERSION lt $cv) { 14 print STDERR "Your $ph is newer than Devel::PPPort. Update skipped\n"; 15 exit 0; # I have a newer already 16 } 17 18 my $old = do { local (@ARGV, $/) = ($ph); <> }; 19 move $ph, "$ph.bkp"; 20 21 Devel::PPPort::WriteFile ("ppport.h"); 22 23 my $new = do { local (@ARGV, $/) = ($ph); <> }; 24 25 if ($old ne $new) { 26 print STDERR "ppport.h updated to $Devel::PPPort::VERSION\n"; 27 unlink "$ph.bkp"; 28 } 29 else { 30 unlink $ph; 31 move "$ph.bkp", $ph; 32 } -- Martin J. Evans Wetherby, UK