mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 22:28:47 -04:00
3-arg open in Makefile.PL
This commit is contained in:
parent
1dbf2ad75c
commit
80f470fa23
1 changed files with 2 additions and 2 deletions
|
@ -90,7 +90,7 @@ if ( 0 ) {
|
||||||
my ($dir, $file, $fh, $version);
|
my ($dir, $file, $fh, $version);
|
||||||
print "Checking installed SQLite version...\n" if $ENV{AUTOMATED_TESTING};
|
print "Checking installed SQLite version...\n" if $ENV{AUTOMATED_TESTING};
|
||||||
if ( $sqlite_inc ) {
|
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: $!";
|
or die "Error opening sqlite3.h in $sqlite_inc: $!";
|
||||||
while ( defined($_ = <$fh>) ) {
|
while ( defined($_ = <$fh>) ) {
|
||||||
if (/\#define\s+SQLITE_VERSION_NUMBER\s+(\d+)/) {
|
if (/\#define\s+SQLITE_VERSION_NUMBER\s+(\d+)/) {
|
||||||
|
@ -104,7 +104,7 @@ if ( 0 ) {
|
||||||
foreach $dir ( [ qw(usr include) ], [ qw(usr local include) ] ) {
|
foreach $dir ( [ qw(usr include) ], [ qw(usr local include) ] ) {
|
||||||
$file = File::Spec->catfile('', @$dir, 'sqlite3.h');
|
$file = File::Spec->catfile('', @$dir, 'sqlite3.h');
|
||||||
next unless (-f $file);
|
next unless (-f $file);
|
||||||
open($fh, "< $file") or die "Error opening $file: $!";
|
open($fh, "<", $file) or die "Error opening $file: $!";
|
||||||
while ( defined($_ = <$fh>) ) {
|
while ( defined($_ = <$fh>) ) {
|
||||||
if (/\#define\s+SQLITE_VERSION_NUMBER\s+(\d+)/) {
|
if (/\#define\s+SQLITE_VERSION_NUMBER\s+(\d+)/) {
|
||||||
$version = $1;
|
$version = $1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue