1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 14:19:10 -04:00

3-arg open in Makefile.PL

This commit is contained in:
Alexandr Ciornii 2009-04-04 09:51:55 +00:00
parent 1dbf2ad75c
commit 80f470fa23

View file

@ -90,7 +90,7 @@ if ( 0 ) {
my ($dir, $file, $fh, $version);
print "Checking installed SQLite version...\n" if $ENV{AUTOMATED_TESTING};
if ( $sqlite_inc ) {
open($fh, '< ' . File::Spec->catfile($sqlite_inc, 'sqlite3.h'))
open($fh, '< ' , File::Spec->catfile($sqlite_inc, 'sqlite3.h'))
or die "Error opening sqlite3.h in $sqlite_inc: $!";
while ( defined($_ = <$fh>) ) {
if (/\#define\s+SQLITE_VERSION_NUMBER\s+(\d+)/) {
@ -104,7 +104,7 @@ if ( 0 ) {
foreach $dir ( [ qw(usr include) ], [ qw(usr local include) ] ) {
$file = File::Spec->catfile('', @$dir, 'sqlite3.h');
next unless (-f $file);
open($fh, "< $file") or die "Error opening $file: $!";
open($fh, "<", $file) or die "Error opening $file: $!";
while ( defined($_ = <$fh>) ) {
if (/\#define\s+SQLITE_VERSION_NUMBER\s+(\d+)/) {
$version = $1;