r69991 - in /trunk/libdbix-simple-perl: Changes META.yml debian/changelog lib/DBIx/Simple.pm t/sqlite.t
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Sun Feb 27 21:48:47 UTC 2011
Author: jawnsy-guest
Date: Sun Feb 27 21:48:39 2011
New Revision: 69991
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=69991
Log:
new version, dfsg freeness still questionable
Modified:
trunk/libdbix-simple-perl/Changes
trunk/libdbix-simple-perl/META.yml
trunk/libdbix-simple-perl/debian/changelog
trunk/libdbix-simple-perl/lib/DBIx/Simple.pm
trunk/libdbix-simple-perl/t/sqlite.t
Modified: trunk/libdbix-simple-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-simple-perl/Changes?rev=69991&op=diff
==============================================================================
--- trunk/libdbix-simple-perl/Changes (original)
+++ trunk/libdbix-simple-perl/Changes Sun Feb 27 21:48:39 2011
@@ -2,6 +2,10 @@
Incompatible changes are marked with "!!". Incompatibility with and changes in
"undocumented features" are not always specifically mentioned here.
+
+1.35 Tue Jan 4 23:48 2010
+ !! - RaiseError is now enabled by default, as announced three years ago.
+ Set PERL_DBIX_SIMPLE_NO_RAISEERROR=1 to get the old behavior.
1.34 Mon Dec 12 16:28 2010
- Added missing documentation. (Reported by Krassimir Berov.)
Modified: trunk/libdbix-simple-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-simple-perl/META.yml?rev=69991&op=diff
==============================================================================
--- trunk/libdbix-simple-perl/META.yml (original)
+++ trunk/libdbix-simple-perl/META.yml Sun Feb 27 21:48:39 2011
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: DBIx-Simple
-version: 1.34
+version: 1.35
abstract: Very complete easy-to-use OO interface to DBI
author:
- Juerd Waalboer <juerd at cpan.org>
Modified: trunk/libdbix-simple-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-simple-perl/debian/changelog?rev=69991&op=diff
==============================================================================
--- trunk/libdbix-simple-perl/debian/changelog (original)
+++ trunk/libdbix-simple-perl/debian/changelog Sun Feb 27 21:48:39 2011
@@ -1,4 +1,4 @@
-libdbix-simple-perl (1.34-1) UNRELEASED; urgency=low
+libdbix-simple-perl (1.35-1) UNRELEASED; urgency=low
"Any OSI-Approved License"? Not sure of the DFSG-freeness here...
@@ -16,7 +16,7 @@
[ Ryan Niebur ]
* Update jawnsy's email address
- -- Jonathan Yu <jawnsy at cpan.org> Fri, 24 Dec 2010 16:17:32 -0500
+ -- Jonathan Yu <jawnsy at cpan.org> Sun, 27 Feb 2011 17:10:26 -0500
libdbix-simple-perl (1.32-1) unstable; urgency=low
Modified: trunk/libdbix-simple-perl/lib/DBIx/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-simple-perl/lib/DBIx/Simple.pm?rev=69991&op=diff
==============================================================================
--- trunk/libdbix-simple-perl/lib/DBIx/Simple.pm (original)
+++ trunk/libdbix-simple-perl/lib/DBIx/Simple.pm Sun Feb 27 21:48:39 2011
@@ -3,9 +3,11 @@
use DBI;
use Carp ();
-$DBIx::Simple::VERSION = '1.34';
+$DBIx::Simple::VERSION = '1.35';
$Carp::Internal{$_} = 1
for qw(DBIx::Simple DBIx::Simple::Result DBIx::Simple::DeadObject);
+
+my $no_raiseerror = $ENV{PERL_DBIX_SIMPLE_NO_RAISEERROR};
my $quoted = qr/(?:'[^']*'|"[^"]*")*/; # 'foo''bar' simply matches the (?:) twice
my $quoted_mysql = qr/(?:(?:[^\\']*(?:\\.[^\\']*)*)'|"(?:[^\\"]*(?:\\.[^\\"]*)*)")*/;
@@ -44,7 +46,10 @@
if @arguments;
} else {
$arguments[3]->{PrintError} = 0
- unless defined $arguments[3] and defined $arguments[3]{PrintError};
+ unless defined $arguments[3] and exists $arguments[3]{PrintError};
+ $arguments[3]->{RaiseError} = 1
+ unless $no_raiseerror
+ or defined $arguments[3] and exists $arguments[3]{RaiseError};
$self->{dbh} = DBI->connect(@arguments);
}
@@ -676,6 +681,12 @@
You cannot use this method to clone a DBIx::Simple object: the $dbh passed
should be a DBI::db object, not a DBIx::Simple object.
+For new connections, PrintError is disabled by default. If you enable it,
+beware that it will report line numbers in DBIx/Simple.pm.
+
+For new connections, B<RaiseError is enabled by default> unless the environment
+variable C<PERL_DBIX_SIMPLE_NO_RAISEERROR> is set to a non-empty non-0 value.
+
This method is the constructor and returns a DBIx::Simple object on success. On
failure, it returns undef.
@@ -1069,8 +1080,6 @@
The mapping methods do not check whether the keys are unique. Rows that are
fetched later overwrite earlier ones.
-PrintError is disabled by default. If you enable it, beware that it will report
-line numbers in DBIx/Simple.pm.
=head1 LICENSE
Modified: trunk/libdbix-simple-perl/t/sqlite.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbix-simple-perl/t/sqlite.t?rev=69991&op=diff
==============================================================================
--- trunk/libdbix-simple-perl/t/sqlite.t (original)
+++ trunk/libdbix-simple-perl/t/sqlite.t Sun Feb 27 21:48:39 2011
@@ -7,17 +7,20 @@
eval { DBD::SQLite->VERSION >= 1 }
or plan skip_all => 'DBD::SQLite >= 1.00 required';
- plan tests => 56;
+ plan tests => 57;
use_ok('DBIx::Simple');
}
# In memory database! No file permission troubles, no I/O slowness.
# http://use.perl.org/~tomhukins/journal/31457 ++
-my $db = DBIx::Simple->connect('dbi:SQLite:dbname=:memory:', '', '', { RaiseError => 1 });
+my $db = DBIx::Simple->connect('dbi:SQLite:dbname=:memory:');
my $q = 'SELECT * FROM xyzzy ORDER BY foo';
ok($db);
+
+eval { $db->query('SYNTAX ERR0R !@#!@#') };
+like($@, qr/prepare failed/); # test RaiseError
ok($db->query('CREATE TABLE xyzzy (FOO, bar, baz)'));
More information about the Pkg-perl-cvs-commits
mailing list