[libdbd-xbase-perl] 03/13: Imported Upstream version 1.06

gregor herrmann gregoa at debian.org
Mon Mar 7 22:54:07 UTC 2016


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libdbd-xbase-perl.

commit 44f8db420fbef2897d07c5a690647925b9070c10
Author: gregor herrmann <gregoa at debian.org>
Date:   Mon Mar 7 23:33:33 2016 +0100

    Imported Upstream version 1.06
---
 Changes                           |  9 +++++++++
 Changes => DBD-XBase-1.06/Changes |  9 +++++++++
 README                            |  2 +-
 lib/DBD/XBase.pm                  | 10 ++++------
 lib/XBase.pm                      | 17 +++++++++++------
 lib/XBase/SQL.pm                  |  4 ++--
 t/9_dbd_create.t                  | 22 +++++++++++++++++++++-
 7 files changed, 57 insertions(+), 16 deletions(-)

diff --git a/Changes b/Changes
index d57f302..d8b4f04 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,15 @@
 
 Revision history for Perl extension XBase and DBD::XBase.
 
+1.06 Sun Mar  6 20:48:11 CET 2016
+	Add support for W column type (byte array by Visual FoxPro).
+
+	Fixed overload arg warning.
+
+	Restore the table_info functionality.
+
+	Fix for type B little endian issue, reported by Andres Thomas.
+
 1.05 Wed Apr 24 19:37:09 CEST 2013
 	Fix for prepare_select_eq and empty MDX indexes, patch by Julian
 	Bridle.
diff --git a/Changes b/DBD-XBase-1.06/Changes
similarity index 98%
copy from Changes
copy to DBD-XBase-1.06/Changes
index d57f302..d8b4f04 100644
--- a/Changes
+++ b/DBD-XBase-1.06/Changes
@@ -1,6 +1,15 @@
 
 Revision history for Perl extension XBase and DBD::XBase.
 
+1.06 Sun Mar  6 20:48:11 CET 2016
+	Add support for W column type (byte array by Visual FoxPro).
+
+	Fixed overload arg warning.
+
+	Restore the table_info functionality.
+
+	Fix for type B little endian issue, reported by Andres Thomas.
+
 1.05 Wed Apr 24 19:37:09 CEST 2013
 	Fix for prepare_select_eq and empty MDX indexes, patch by Julian
 	Bridle.
diff --git a/README b/README
index ae215ea..8a2d7b7 100644
--- a/README
+++ b/README
@@ -100,7 +100,7 @@ Available:
 	Contact the author at jpx dash perl at adelton dot com.
 
 
-Copyright: (c) 1997--2011 Jan Pazdziora.
+Copyright: (c) 1997--2016 Jan Pazdziora.
 	All rights reserved. This package is free software; you can
 	redistribute it and/or modify it under the same terms as Perl
 	itself.
diff --git a/lib/DBD/XBase.pm b/lib/DBD/XBase.pm
index 30205bd..f2d987e 100644
--- a/lib/DBD/XBase.pm
+++ b/lib/DBD/XBase.pm
@@ -19,7 +19,7 @@ use Exporter;
 use vars qw( $VERSION @ISA @EXPORT $err $errstr $drh $sqlstate );
 			# a couple of global variables that may come handy
 
-$VERSION = '1.05';
+$VERSION = '1.06';
 
 $err = 0;
 $errstr = '';
@@ -284,9 +284,7 @@ sub execute {
 	# binded parameters
 	my $bind_values = $sth->{'xbase_bind_values'};
 
-	### the following code seems to somehow protect those "fixed"
-	### statements but I do not understand it at the moment
-	### if (defined $sth->{'xbase_lines'}) { return -1; }
+	if (defined $sth->{'xbase_lines'}) { return -1; }
 
 	# cancel the count of rows done in the previous run, this is a
 	# new execute
@@ -764,7 +762,7 @@ The memo fields will come out as nulls.
 
 =head1 VERSION
 
-1.05
+1.06
 
 =head1 AVAILABLE FROM
 
@@ -772,7 +770,7 @@ http://www.adelton.com/perl/DBD-XBase/
 
 =head1 AUTHOR
 
-(c) 1997--2013 Jan Pazdziora.
+(c) 1997--2016 Jan Pazdziora.
 
 Contact the author at jpx dash perl at adelton dot com.
 
diff --git a/lib/XBase.pm b/lib/XBase.pm
index b345c7e..e563296 100644
--- a/lib/XBase.pm
+++ b/lib/XBase.pm
@@ -20,7 +20,7 @@ use XBase::Base;		# will give us general methods
 use vars qw( $VERSION $errstr $CLEARNULLS @ISA );
 
 @ISA = qw( XBase::Base );
-$VERSION = '1.02';
+$VERSION = '1.06';
 $CLEARNULLS = 1;		# Cut off white spaces from ends of char fields
 
 *errstr = \$XBase::Base::errstr;
@@ -137,10 +137,15 @@ sub read_header {
 			$wproc = sub { pack 'V', shift; };
 		}
 		elsif ($type eq 'B') {		# Fox double
-			$rproc = sub { unpack 'd', reverse scalar shift; };
-			$wproc = sub { reverse scalar pack 'd', shift; };
+			if (pack("L", 1) eq pack("V", 1)) {
+				$rproc = sub { unpack 'd', scalar shift; };
+				$wproc = sub { scalar pack 'd', shift; };
+			} else {
+				$rproc = sub { unpack 'd', reverse scalar shift; };
+				$wproc = sub { reverse scalar pack 'd', shift; };
+			}
 		}
-		elsif ($type =~ /^[MGP]$/) {	# memo fields
+		elsif ($type =~ /^[WMGP]$/) {	# memo fields
 			my $memo = $self->{'memo'};
 			if (not defined $memo and not $self->{'openoptions'}{'ignorememo'}) {
 				$memo = $self->{'memo'} = $self->init_memo_field() or return;
@@ -1397,7 +1402,7 @@ Thanks a lot.
 
 =head1 VERSION
 
-1.02
+1.06
 
 =head1 AVAILABLE FROM
 
@@ -1405,7 +1410,7 @@ http://www.adelton.com/perl/DBD-XBase/
 
 =head1 AUTHOR
 
-(c) 1997--2011 Jan Pazdziora.
+(c) 1997--2016 Jan Pazdziora.
 
 All rights reserved. This package is free software; you can
 redistribute it and/or modify it under the same terms as Perl itself.
diff --git a/lib/XBase/SQL.pm b/lib/XBase/SQL.pm
index e1b9f2d..0d2007a 100644
--- a/lib/XBase/SQL.pm
+++ b/lib/XBase/SQL.pm
@@ -8,7 +8,7 @@ package XBase::SQL;
 use strict;
 use vars qw( $VERSION %COMMANDS );
 
-$VERSION = '0.233';
+$VERSION = '1.06';
 
 # #################################
 # Type conversions for create table
@@ -658,7 +658,7 @@ use overload
 	'""' => sub { ref shift; },
 	'.' => sub { XBase::SQL::Expr->string($_[0]->value . $_[1]->value); },
 	'*'  => sub { XBase::SQL::Expr->number($_[0]->value * $_[1]->value);},
-	'not'  => sub { not $_[0]->value },
+	'!'  => sub { not $_[0]->value },
 	;
 
 sub new { bless {}, shift; }
diff --git a/t/9_dbd_create.t b/t/9_dbd_create.t
index 72bddda..21595e9 100644
--- a/t/9_dbd_create.t
+++ b/t/9_dbd_create.t
@@ -11,7 +11,7 @@ BEGIN	{
 		print "Error returned from eval was:\n", $@;
 		exit;
 	}
-	print "1..12\n";
+	print "1..16\n";
 	print "DBI loaded\n";
 }
 
@@ -118,6 +118,26 @@ if ($dbh->selectall_arrayref(q! select * from newtable !)) {
 }
 print "ok 12\n";
 
+my $table_info_sth = $dbh->table_info();
+if (defined $table_info_sth) {
+	print "ok 13\n";
+	my $table_info_data = $table_info_sth->fetchall_arrayref;
+	if (defined $table_info_data) {
+		print "ok 14\n";
+		if (scalar @$table_info_data != 12) {
+			print 'not ';
+		}
+		print "ok 15\n";
+		my @tables = sort map { $_->[2] } grep { not defined $_->[0] and not defined $_->[1] and $_->[3] eq 'TABLE' } @$table_info_data;
+		my $expected_tables = 'afox5 ndx-char ndx-date ndx-num ntx-char rooms rooms1 test tstidx types write write1';
+		if ("@tables" ne $expected_tables) {
+			print STDERR "Expected table_info: [$expected_tables]\nGot table_info: [@tables]\n";
+			print 'not ';
+		}
+		print "ok 16\n";
+	}
+}
+
 $dbh->disconnect();
 
 1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdbd-xbase-perl.git



More information about the Pkg-perl-cvs-commits mailing list