r77241 - in /branches/upstream/libjifty-dbi-perl/current: Changes META.yml SIGNATURE lib/Jifty/DBI.pm lib/Jifty/DBI/Handle.pm lib/Jifty/DBI/Record.pm lib/Jifty/DBI/Schema.pm t/01records.t

fabreg-guest at users.alioth.debian.org fabreg-guest at users.alioth.debian.org
Fri Jul 8 15:09:21 UTC 2011


Author: fabreg-guest
Date: Fri Jul  8 15:09:20 2011
New Revision: 77241

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=77241
Log:
[svn-upgrade] new version libjifty-dbi-perl (0.71)

Modified:
    branches/upstream/libjifty-dbi-perl/current/Changes
    branches/upstream/libjifty-dbi-perl/current/META.yml
    branches/upstream/libjifty-dbi-perl/current/SIGNATURE
    branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI.pm
    branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Handle.pm
    branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Record.pm
    branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Schema.pm
    branches/upstream/libjifty-dbi-perl/current/t/01records.t

Modified: branches/upstream/libjifty-dbi-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/Changes?rev=77241&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/Changes (original)
+++ branches/upstream/libjifty-dbi-perl/current/Changes Fri Jul  8 15:09:20 2011
@@ -1,4 +1,17 @@
 Revision history for Perl extension Jifty::DBI.
+
+0.71 2011-06-17
+- Fixes:
+    * Ensure canonicalization and validation triggers are properly found
+      (Thomas Sibley)
+
+0.70 2011-06-15
+- Fixes:
+    * Respect manual column sort_orders (Thomas Sibley)
+    * Produce more useful error messages during schema upgrades (Thomas Sibley)
+
+- Documentation:
+    * Clarify what value after_set_* hooks receive (Thomas Sibley)
 
 0.69 2011-05-17
 - Fixes:

Modified: branches/upstream/libjifty-dbi-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/META.yml?rev=77241&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/META.yml (original)
+++ branches/upstream/libjifty-dbi-perl/current/META.yml Fri Jul  8 15:09:20 2011
@@ -47,4 +47,4 @@
   version: 0
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.69
+version: 0.71

Modified: branches/upstream/libjifty-dbi-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/SIGNATURE?rev=77241&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/SIGNATURE (original)
+++ branches/upstream/libjifty-dbi-perl/current/SIGNATURE Fri Jul  8 15:09:20 2011
@@ -1,5 +1,5 @@
 This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.66.
+signed via the Module::Signature module, version 0.68.
 
 To verify the content in this distribution, first make sure you have
 Module::Signature installed, then type:
@@ -14,10 +14,10 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 418a58763132c9a476627cbdce5ff01395ce84d4 .gitignore
-SHA1 59a52f546dcd1cd87813bc59babf7b1cd32ac2d3 Changes
+SHA1 74f8212259f8d8cd02a39dbbf8026ff0c3485f5b .gitignore
+SHA1 7a40cacb89acb4b67a40f7e671b04cfcd5094a0d Changes
 SHA1 c2fb135f967d7093a6191d1b7e5e596e30040246 MANIFEST
-SHA1 da76cdd7f1c89f107d3d5c9608aff9f886e503f8 META.yml
+SHA1 96ae1f72065ab51db5b7206c410aed913dbdac8b META.yml
 SHA1 48bd6ca8a37ec79b7cae91028d7e9489ad33a03b Makefile.PL
 SHA1 e29d7b270f78a5a406921571b08290c46f2a42f6 README
 SHA1 82d6ac3f6def48558d09f8b6e3b53ed4194d8c81 ROADMAP
@@ -31,17 +31,17 @@
 SHA1 7cea1a5289f79c2a87837924a83feb583f6e8890 ex/Example/Model/Employee.pm
 SHA1 a9d62e4f5b43b2f78066172a4771238ee7df6339 ex/create_tables.pl
 SHA1 20c73697e1713638140c719d8eaa19a275ed43a5 inc/Module/AutoInstall.pm
-SHA1 7305dbe2904416e28decb05396988a5d51d578be inc/Module/Install.pm
-SHA1 ca13d9875e1249f6e84f7070be8152c34837955e inc/Module/Install/AutoInstall.pm
-SHA1 129960509127732258570c122042bc48615222e1 inc/Module/Install/Base.pm
-SHA1 cf3356ed9a5bd2f732527ef9e7bc5ef4458c8a93 inc/Module/Install/Can.pm
-SHA1 bf0a3e1977effc2832d7a813a76dce3f31b437b6 inc/Module/Install/Fetch.pm
-SHA1 b501b0df59a5cd235cca473889f82c3d3429f39e inc/Module/Install/Include.pm
-SHA1 b721c93ca5bc9a6aa863b49af15f1b1de6125935 inc/Module/Install/Makefile.pm
-SHA1 026cc0551a0ad399d195e395b46bdf842e115192 inc/Module/Install/Metadata.pm
-SHA1 5457015ea5a50e93465bf2dafa29feebd547f85b inc/Module/Install/Win32.pm
-SHA1 051e7fa8063908befa3440508d0584a2497b97db inc/Module/Install/WriteAll.pm
-SHA1 3a442252053b99436c8cdd084ced4801e4e22381 lib/Jifty/DBI.pm
+SHA1 7b4ae50ebac72d20761171c4c2b50c206344ea40 inc/Module/Install.pm
+SHA1 c3cb159acd7618ea662f28deb0d0bf8f24742ebb inc/Module/Install/AutoInstall.pm
+SHA1 d9fe55a427fe2fd75b5029afeeaa61b592e07f79 inc/Module/Install/Base.pm
+SHA1 62d3922826d9f89f20c185e7031ac8f028504745 inc/Module/Install/Can.pm
+SHA1 dc809f64fb70a26b069a36f8d3d353d520dbb7e1 inc/Module/Install/Fetch.pm
+SHA1 d859f2d8048708f16b5fd92f54c988a3c4c1ae30 inc/Module/Install/Include.pm
+SHA1 73ab91490a628452cc140db72ef9d13a1326d211 inc/Module/Install/Makefile.pm
+SHA1 8ce3f2b414e4617e6233dd4ba10830f8c5d672ec inc/Module/Install/Metadata.pm
+SHA1 3b0acd2eeac93a0afe48120f5648f0db362e5bbf inc/Module/Install/Win32.pm
+SHA1 f08924f051e623f8e09fa6a121993c4a9cf7d9eb inc/Module/Install/WriteAll.pm
+SHA1 867699c1c76ee490806be5faa204c41c10db41c9 lib/Jifty/DBI.pm
 SHA1 fcab228fade86231a4a6024bd2c06813bbe4e555 lib/Jifty/DBI/Collection.pm
 SHA1 503ca4cf6693580dedf8adee58267532f8467908 lib/Jifty/DBI/Collection/Union.pm
 SHA1 bcba77fd2bacf0475aea1de97f57365c8de92ca6 lib/Jifty/DBI/Collection/Unique.pm
@@ -59,7 +59,7 @@
 SHA1 67ffe7188a1f529d7594f4fa3803bcbe15ba6485 lib/Jifty/DBI/Filter/YAML.pm
 SHA1 a0ba8e98fd032ef018bf2119adc2b2c4d1619450 lib/Jifty/DBI/Filter/base64.pm
 SHA1 ad030f4ec217584bedef2fe2720e4f9b1bc5af19 lib/Jifty/DBI/Filter/utf8.pm
-SHA1 b043cbb2d750aa1b93e25718ec563d62b3cf13b8 lib/Jifty/DBI/Handle.pm
+SHA1 ade893df2198488c27b7c79fbdf0512faa435d00 lib/Jifty/DBI/Handle.pm
 SHA1 719a11c911aac5306baa4b44f683aa76261100c7 lib/Jifty/DBI/Handle/Informix.pm
 SHA1 338116a45f8eb6bfca5e76e8d3be78fb61fffe81 lib/Jifty/DBI/Handle/ODBC.pm
 SHA1 8281a163b21bb4a5cb0f2b24ce4a55dab716c408 lib/Jifty/DBI/Handle/Oracle.pm
@@ -68,17 +68,17 @@
 SHA1 bba2314c20fcc3ef71cc69090f1cd6bd515cd9b4 lib/Jifty/DBI/Handle/Sybase.pm
 SHA1 cf80896a175702a157770f64ae469430678c3357 lib/Jifty/DBI/Handle/mysql.pm
 SHA1 f2cc4fcce79c9a88a023d4e6bd96c2089eef1ced lib/Jifty/DBI/Handle/mysqlPP.pm
-SHA1 b7eca843dfbf0607bde08f566b2d03ba52fe82fd lib/Jifty/DBI/HasFilters.pm
-SHA1 e6710da080f80146fe7bbe75338c5ef382f0bd4a lib/Jifty/DBI/Record.pm
+SHA1 af372dca1ebf532924f2209c65fdda8ea21c36e8 lib/Jifty/DBI/HasFilters.pm
+SHA1 230a62ba703b654d5fa2d318db99f44ceee4be67 lib/Jifty/DBI/Record.pm
 SHA1 663978b31373520d1e2deec87e957d1dbfd1347c lib/Jifty/DBI/Record/Cachable.pm
 SHA1 e30b1a3be2101d839a0a57e921e6f87889ef8da1 lib/Jifty/DBI/Record/Memcached.pm
 SHA1 53834b3315a509ba33a8647681f472d3ae7b0557 lib/Jifty/DBI/Record/Plugin.pm
-SHA1 302f3c09c4d5625ad8db4c0ddaafe8cd0207ea97 lib/Jifty/DBI/Schema.pm
+SHA1 c21f26b802ccf5a24db866ad4d6d1e3961f89892 lib/Jifty/DBI/Schema.pm
 SHA1 0e347c238e62424ca029d60ac03fce75bb2af2a2 lib/Jifty/DBI/SchemaGenerator.pm
 SHA1 32834b7c4cf5a8d131382fccc8db341be8768291 t/00.load.t
 SHA1 9aa7fed2b2409faa4c71d2a45db210721f47403e t/01-version_checks.t
 SHA1 13c9fe3eeec0d000a7c86ea2474e30186cbc37e2 t/01basics.t
-SHA1 fa795e10da8ce94f1991d893e5d179e79075129e t/01records.t
+SHA1 1a9831e19e42d1e8d8da0ed923d5e055c3bdebeb t/01records.t
 SHA1 7574130aa1dc5338b6efcd0f04eca3f6dc4b2696 t/01searches.t
 SHA1 df97ee4e5bcb4ef0663dcc1a8db86dc66e8d9206 t/02-column_constraints.t
 SHA1 1c2bd056c575bc74caf2e59bdda8d8eb2731a3e7 t/02records_cachable.t
@@ -112,7 +112,7 @@
 SHA1 befc46d5364088775b6dda5ae1cf970c1b0fa4e8 t/19reference.t
 SHA1 72a16ddfc2642564023448450f3475ae5abf6d86 t/20overload.t
 SHA1 0e7ceb6deb91ae0c15bbd42f946b65a44e704706 t/99-pod-coverage.t
-SHA1 6ab50a9c21584c841e8ece93bba46d779d82992b t/99-pod-spelling.t
+SHA1 23ed1811c0c3d28c4585965f450a5140ffafe813 t/99-pod-spelling.t
 SHA1 8841b06de7875ffba985ce82c347737ca098aa1a t/99-pod.t
 SHA1 82ee6497512299eea11063a3610d4fbc429d49b6 t/99-tabs.t
 SHA1 5e1158a9340410d46ffad19f381982159dccc924 t/case_sensitivity.t
@@ -120,9 +120,9 @@
 SHA1 97e60dd523a74a886c170eeb05b813aa551f5efe t/testmodels.pl
 SHA1 653c2f961d8b4f195e5391cd261f37815068e8d5 t/utils.pl
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.10 (Darwin)
+Version: GnuPG v1.4.10 (GNU/Linux)
 
-iEYEARECAAYFAk2nHj0ACgkQsxfQtHhyRPrWkQCfc7CyLd/KO0JgsR6RKGRhlkkh
-gyYAnioe5ZVx9iTThRBm2gmhnDZEDgfy
-=JFMa
+iD8DBQFN+7qKHdv9ZfNcOAcRApeeAJsHOvEWwuLTFGePu/uRliaqjWhe4QCfZWNd
+BXlq1dEs6wkmWu5d9zQBWkM=
+=+/px
 -----END PGP SIGNATURE-----

Modified: branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI.pm?rev=77241&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI.pm (original)
+++ branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI.pm Fri Jul  8 15:09:20 2011
@@ -2,7 +2,7 @@
 use warnings;
 use strict;
 
-$Jifty::DBI::VERSION = '0.69';
+$Jifty::DBI::VERSION = '0.71';
 
 =head1 NAME
 

Modified: branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Handle.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Handle.pm?rev=77241&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Handle.pm (original)
+++ branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Handle.pm Fri Jul  8 15:09:20 2011
@@ -584,21 +584,21 @@
     }
 
     if ( $@ or !$executed ) {
+        my $message = "$self couldn't execute the query '$query_string': "
+                        . ($self->dbh->errstr || $@);
+
         if ($DEBUG) {
-            die "$self couldn't execute the query '$query_string'"
-                . $self->dbh->errstr . "\n";
-
+            die "$message\n";
         } else {
 
  # XXX: This warn doesn't show up because we mask logging in Jifty::Test::END.
  # and it usually fails because the test server is still running.
-            warn "$self couldn't execute the query '$query_string'";
+            warn "$message\n";
 
             my $ret = Class::ReturnValue->new();
             $ret->as_error(
                 errno   => '-1',
-                message => "Couldn't execute the query '$query_string'"
-                    . $self->dbh->errstr,
+                message => $message,
                 do_backtrace => undef
             );
             return ( $ret->return_value );

Modified: branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Record.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Record.pm?rev=77241&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Record.pm (original)
+++ branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Record.pm Fri Jul  8 15:09:20 2011
@@ -734,7 +734,9 @@
 This hook will be called after a value is successfully set in the
 database. It will be called with a reference to a paramhash that
 contains C<column> and C<value> keys. If C<value> was a SQL function,
-it will now contain the actual value that was set.
+it will now contain the actual value that was set. If C<column> has
+filters on it, C<value> will be the result of going through an encode
+and decode cycle.
 
 This hook's return value is ignored.
 
@@ -1744,7 +1746,8 @@
     my $method = "canonicalize_$key";
     if ( $self->can($method) ) {
         return 1;
-    } elsif ( Class::Trigger::__fetch_all_triggers($self, $method) ) {
+    # We have to force context here because we're reaching inside Class::Trigger
+    } elsif ( my @sighs = Class::Trigger::__fetch_all_triggers($self, $method) ) {
         return 1;
     } else {
         return undef;
@@ -1795,7 +1798,8 @@
     my $method = "validate_$key";
     if ( $self->can( $method ) ) {
         return 1;
-    } elsif ( Class::Trigger::__fetch_all_triggers($self, $method) ) {
+    # We have to force context here because we're reaching inside Class::Trigger
+    } elsif ( my @sighs = Class::Trigger::__fetch_all_triggers($self, $method) ) {
         return 1;
     } else {
         return undef;

Modified: branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Schema.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Schema.pm?rev=77241&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Schema.pm (original)
+++ branches/upstream/libjifty-dbi-perl/current/lib/Jifty/DBI/Schema.pm Fri Jul  8 15:09:20 2011
@@ -326,7 +326,8 @@
     # XXX: deprecated
     $column->mandatory(1) if delete $column->attributes->{not_null};
 
-    $column->sort_order($SORT_ORDERS->{$from}++);
+    $column->sort_order($SORT_ORDERS->{$from}++)
+        unless defined $column->sort_order;
 
     $column->input_filters($column->{input_filters} || []);
     $column->output_filters($column->{output_filters} || []);

Modified: branches/upstream/libjifty-dbi-perl/current/t/01records.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjifty-dbi-perl/current/t/01records.t?rev=77241&op=diff
==============================================================================
--- branches/upstream/libjifty-dbi-perl/current/t/01records.t (original)
+++ branches/upstream/libjifty-dbi-perl/current/t/01records.t Fri Jul  8 15:09:20 2011
@@ -8,7 +8,7 @@
 BEGIN { require "t/utils.pl" }
 our (@available_drivers);
 
-use constant TESTS_PER_DRIVER => 71;
+use constant TESTS_PER_DRIVER => 72;
 
 my $total = scalar(@available_drivers) * TESTS_PER_DRIVER;
 plan tests => $total;
@@ -40,6 +40,8 @@
         is( $rec->_accessible('unexpected_column' => 'read'), undef, "column doesn't exist and can't be accessible for read" );
         is_deeply( [sort($rec->readable_attributes)], [sort qw(address employee_id id name phone)], 'readable attributes' );
         is_deeply( [sort($rec->writable_attributes)], [sort qw(address employee_id name phone)], 'writable attributes' );
+
+        is $rec->column('employee_id')->sort_order, -1, "got manual sort order";
 
         can_ok($rec,'create');
 
@@ -309,7 +311,8 @@
   default is '';
 
 column employee_id =>
-  type is 'int(8)';
+  type is 'int(8)',
+  order is -1;
 }
 }
 1;




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