r17420 - in /branches/upstream/libdbix-class-perl/current: ./ inc/Module/ inc/Module/Install/ lib/DBIx/ lib/DBIx/Class/ lib/DBIx/Class/Schema/ lib/DBIx/Class/Storage/ t/

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Fri Mar 14 09:52:26 UTC 2008


Author: eloy
Date: Fri Mar 14 09:52:25 2008
New Revision: 17420

URL: http://svn.debian.org/wsvn/?sc=1&rev=17420
Log:
[svn-upgrade] Integrating new upstream version, libdbix-class-perl (0.08010)

Added:
    branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Storage/TxnScopeGuard.pm
    branches/upstream/libdbix-class-perl/current/scope-guard.patch
Modified:
    branches/upstream/libdbix-class-perl/current/Changes
    branches/upstream/libdbix-class-perl/current/MANIFEST
    branches/upstream/libdbix-class-perl/current/META.yml
    branches/upstream/libdbix-class-perl/current/README
    branches/upstream/libdbix-class-perl/current/inc/Module/Install.pm
    branches/upstream/libdbix-class-perl/current/inc/Module/Install/AutoInstall.pm
    branches/upstream/libdbix-class-perl/current/inc/Module/Install/Base.pm
    branches/upstream/libdbix-class-perl/current/inc/Module/Install/Build.pm
    branches/upstream/libdbix-class-perl/current/inc/Module/Install/Can.pm
    branches/upstream/libdbix-class-perl/current/inc/Module/Install/Fetch.pm
    branches/upstream/libdbix-class-perl/current/inc/Module/Install/Include.pm
    branches/upstream/libdbix-class-perl/current/inc/Module/Install/Makefile.pm
    branches/upstream/libdbix-class-perl/current/inc/Module/Install/Metadata.pm
    branches/upstream/libdbix-class-perl/current/inc/Module/Install/Scripts.pm
    branches/upstream/libdbix-class-perl/current/inc/Module/Install/Win32.pm
    branches/upstream/libdbix-class-perl/current/inc/Module/Install/WriteAll.pm
    branches/upstream/libdbix-class-perl/current/lib/DBIx/Class.pm
    branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Row.pm
    branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Schema.pm
    branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Schema/Versioned.pm
    branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Storage.pm
    branches/upstream/libdbix-class-perl/current/t/81transactions.t
    branches/upstream/libdbix-class-perl/current/t/94versioning.t

Modified: branches/upstream/libdbix-class-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/Changes?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/Changes (original)
+++ branches/upstream/libdbix-class-perl/current/Changes Fri Mar 14 09:52:25 2008
@@ -1,4 +1,7 @@
 Revision history for DBIx::Class
+
+0.08010 2008-03-01 10:30
+        - Fix t/94versioning.t so it passes with latest SQL::Translator
 
 0.08009 2008-01-20 13:30
         - Made search_rs smarter about when to preserve the cache to fix

Modified: branches/upstream/libdbix-class-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/MANIFEST?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/MANIFEST (original)
+++ branches/upstream/libdbix-class-perl/current/MANIFEST Fri Mar 14 09:52:25 2008
@@ -110,6 +110,7 @@
 lib/DBIx/Class/Storage/DBI/Sybase.pm
 lib/DBIx/Class/Storage/DBI/Sybase/MSSQL.pm
 lib/DBIx/Class/Storage/Statistics.pm
+lib/DBIx/Class/Storage/TxnScopeGuard.pm
 lib/DBIx/Class/Test/SQLite.pm
 lib/DBIx/Class/UTF8Columns.pm
 lib/SQL/Translator/Parser/DBIx/Class.pm
@@ -118,6 +119,7 @@
 MANIFEST			This list of files
 META.yml
 README
+scope-guard.patch
 script/dbicadmin
 t/02pod.t
 t/03podcoverage.t
@@ -265,6 +267,7 @@
 t/lib/DBICTest/Schema/Employee.pm
 t/lib/DBICTest/Schema/Event.pm
 t/lib/DBICTest/Schema/EventTZ.pm
+t/lib/DBICTest/Schema/EventTZ.pm.rej
 t/lib/DBICTest/Schema/FileColumn.pm
 t/lib/DBICTest/Schema/ForceForeign.pm
 t/lib/DBICTest/Schema/FourKeys.pm

Modified: branches/upstream/libdbix-class-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/META.yml?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/META.yml (original)
+++ branches/upstream/libdbix-class-perl/current/META.yml Fri Mar 14 09:52:25 2008
@@ -1,13 +1,14 @@
 --- 
 abstract: Extensible and flexible object <-> relational mapper.
-author: "mst: Matt S. Trout <mst at shadowcatsystems.co.uk>"
+author: 
+  - "mst: Matt S. Trout <mst at shadowcatsystems.co.uk>"
 build_requires: 
   Class::Trigger: 0
   DBD::SQLite: 1.13
   DBIx::ContextualFetch: 0
   Test::Builder: 0.33
 distribution_type: module
-generated_by: Module::Install version 0.67
+generated_by: Module::Install version 0.68
 license: perl
 meta-spec: 
   url: http://module-build.sourceforge.net/META-spec-v1.3.html
@@ -17,6 +18,123 @@
   directory: 
     - inc
     - t
+provides: 
+  DBIC::SQL::Abstract: 
+    file: lib/DBIx/Class/Storage/DBI.pm
+  DBIC::SQL::Abstract::Oracle: 
+    file: lib/DBIx/Class/Storage/DBI/Oracle/WhereJoins.pm
+  DBIx::Class: 
+    file: lib/DBIx/Class.pm
+    version: 0.08010
+  DBIx::Class::AccessorGroup: 
+    file: lib/DBIx/Class/AccessorGroup.pm
+  DBIx::Class::CDBICompat: 
+    file: lib/DBIx/Class/CDBICompat.pm
+  DBIx::Class::CDBICompat::ColumnGroups::GrouperShim: 
+    file: lib/DBIx/Class/CDBICompat/ColumnGroups.pm
+  DBIx::Class::Core: 
+    file: lib/DBIx/Class/Core.pm
+  DBIx::Class::Cursor: 
+    file: lib/DBIx/Class/Cursor.pm
+  DBIx::Class::DB: 
+    file: lib/DBIx/Class/DB.pm
+  DBIx::Class::Exception: 
+    file: lib/DBIx/Class/Exception.pm
+  DBIx::Class::InflateColumn: 
+    file: lib/DBIx/Class/InflateColumn.pm
+  DBIx::Class::InflateColumn::DateTime: 
+    file: lib/DBIx/Class/InflateColumn/DateTime.pm
+  DBIx::Class::InflateColumn::File: 
+    file: lib/DBIx/Class/InflateColumn/File.pm
+  DBIx::Class::Ordered: 
+    file: lib/DBIx/Class/Ordered.pm
+  DBIx::Class::PK: 
+    file: lib/DBIx/Class/PK.pm
+  DBIx::Class::PK::Auto: 
+    file: lib/DBIx/Class/PK/Auto.pm
+  DBIx::Class::Relationship: 
+    file: lib/DBIx/Class/Relationship.pm
+  DBIx::Class::Relationship::Base: 
+    file: lib/DBIx/Class/Relationship/Base.pm
+  DBIx::Class::ResultClass::HashRefInflator: 
+    file: lib/DBIx/Class/ResultClass/HashRefInflator.pm
+  DBIx::Class::ResultSet: 
+    file: lib/DBIx/Class/ResultSet.pm
+  DBIx::Class::ResultSetColumn: 
+    file: lib/DBIx/Class/ResultSetColumn.pm
+  DBIx::Class::ResultSetManager: 
+    file: lib/DBIx/Class/ResultSetManager.pm
+  DBIx::Class::ResultSource: 
+    file: lib/DBIx/Class/ResultSource.pm
+  DBIx::Class::ResultSource::Table: 
+    file: lib/DBIx/Class/ResultSource/Table.pm
+  DBIx::Class::ResultSourceHandle: 
+    file: lib/DBIx/Class/ResultSourceHandle.pm
+  DBIx::Class::ResultSourceProxy::Table: 
+    file: lib/DBIx/Class/ResultSourceProxy/Table.pm
+  DBIx::Class::Row: 
+    file: lib/DBIx/Class/Row.pm
+  DBIx::Class::Schema: 
+    file: lib/DBIx/Class/Schema.pm
+  DBIx::Class::Schema::Versioned: 
+    file: lib/DBIx/Class/Schema/Versioned.pm
+  DBIx::Class::Serialize::Storable: 
+    file: lib/DBIx/Class/Serialize/Storable.pm
+  DBIx::Class::StartupCheck: 
+    file: lib/DBIx/Class/StartupCheck.pm
+  DBIx::Class::Storage: 
+    file: lib/DBIx/Class/Storage.pm
+  DBIx::Class::Storage::DBI: 
+    file: lib/DBIx/Class/Storage/DBI.pm
+  DBIx::Class::Storage::DBI::Cursor: 
+    file: lib/DBIx/Class/Storage/DBI/Cursor.pm
+  DBIx::Class::Storage::DBI::DB2: 
+    file: lib/DBIx/Class/Storage/DBI/DB2.pm
+  DBIx::Class::Storage::DBI::MSSQL: 
+    file: lib/DBIx/Class/Storage/DBI/MSSQL.pm
+  DBIx::Class::Storage::DBI::MultiDistinctEmulation: 
+    file: lib/DBIx/Class/Storage/DBI/MultiDistinctEmulation.pm
+  DBIx::Class::Storage::DBI::NoBindVars: 
+    file: lib/DBIx/Class/Storage/DBI/NoBindVars.pm
+  DBIx::Class::Storage::DBI::ODBC: 
+    file: lib/DBIx/Class/Storage/DBI/ODBC.pm
+  DBIx::Class::Storage::DBI::ODBC::DB2_400_SQL: 
+    file: lib/DBIx/Class/Storage/DBI/ODBC/DB2_400_SQL.pm
+  DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server: 
+    file: lib/DBIx/Class/Storage/DBI/ODBC/Microsoft_SQL_Server.pm
+  DBIx::Class::Storage::DBI::Oracle: 
+    file: lib/DBIx/Class/Storage/DBI/Oracle.pm
+  DBIx::Class::Storage::DBI::Oracle::Generic: 
+    file: lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm
+  DBIx::Class::Storage::DBI::Oracle::WhereJoins: 
+    file: lib/DBIx/Class/Storage/DBI/Oracle/WhereJoins.pm
+  DBIx::Class::Storage::DBI::Pg: 
+    file: lib/DBIx/Class/Storage/DBI/Pg.pm
+  DBIx::Class::Storage::DBI::Replication: 
+    file: lib/DBIx/Class/Storage/DBI/Replication.pm
+  DBIx::Class::Storage::DBI::SQLite: 
+    file: lib/DBIx/Class/Storage/DBI/SQLite.pm
+  DBIx::Class::Storage::DBI::Sybase: 
+    file: lib/DBIx/Class/Storage/DBI/Sybase.pm
+  DBIx::Class::Storage::DBI::Sybase::MSSQL: 
+    file: lib/DBIx/Class/Storage/DBI/Sybase/MSSQL.pm
+  DBIx::Class::Storage::DBI::mysql: 
+    file: lib/DBIx/Class/Storage/DBI/mysql.pm
+  DBIx::Class::Storage::Statistics: 
+    file: lib/DBIx/Class/Storage/Statistics.pm
+  DBIx::Class::Test::SQLite: 
+    file: lib/DBIx/Class/Test/SQLite.pm
+  DBIx::Class::UTF8Columns: 
+    file: lib/DBIx/Class/UTF8Columns.pm
+  DBIx::Class::Version: 
+    file: lib/DBIx/Class/Schema/Versioned.pm
+  DBIx::Class::Version::Table: 
+    file: lib/DBIx/Class/Schema/Versioned.pm
+  SQL::Translator::Producer::DBIx::Class::File: 
+    file: lib/SQL/Translator/Producer/DBIx/Class/File.pm
+    version: 0.1
+  TestRHBug: 
+    file: lib/DBIx/Class/StartupCheck.pm
 requires: 
   Carp::Clan: 0
   Class::Accessor::Grouped: 0.05002
@@ -34,4 +152,4 @@
   Storable: 0
   perl: 5.6.1
 tests: t/*.t t/*/*.t
-version: 0.08009
+version: 0.08010

Modified: branches/upstream/libdbix-class-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/README?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/README (original)
+++ branches/upstream/libdbix-class-perl/current/README Fri Mar 14 09:52:25 2008
@@ -207,6 +207,8 @@
 
     Numa: Dan Sully <daniel at cpan.org>
 
+    oyse: Øystein Torget <oystein.torget at dnv.com>
+
     paulm: Paul Makepeace
 
     penguin: K J Cheetham

Modified: branches/upstream/libdbix-class-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/inc/Module/Install.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libdbix-class-perl/current/inc/Module/Install.pm Fri Mar 14 09:52:25 2008
@@ -28,7 +28,7 @@
     # This is not enforced yet, but will be some time in the next few
     # releases once we can make sure it won't clash with custom
     # Module::Install extensions.
-    $VERSION = '0.67';
+    $VERSION = '0.68';
 }
 
 # Whether or not inc::Module::Install is actually loaded, the

Modified: branches/upstream/libdbix-class-perl/current/inc/Module/Install/AutoInstall.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/inc/Module/Install/AutoInstall.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/inc/Module/Install/AutoInstall.pm (original)
+++ branches/upstream/libdbix-class-perl/current/inc/Module/Install/AutoInstall.pm Fri Mar 14 09:52:25 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libdbix-class-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/inc/Module/Install/Base.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libdbix-class-perl/current/inc/Module/Install/Base.pm Fri Mar 14 09:52:25 2008
@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.67';
+$VERSION = '0.68';
 
 # Suspend handler for "redefined" warnings
 BEGIN {

Modified: branches/upstream/libdbix-class-perl/current/inc/Module/Install/Build.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/inc/Module/Install/Build.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/inc/Module/Install/Build.pm (original)
+++ branches/upstream/libdbix-class-perl/current/inc/Module/Install/Build.pm Fri Mar 14 09:52:25 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libdbix-class-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/inc/Module/Install/Can.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libdbix-class-perl/current/inc/Module/Install/Can.pm Fri Mar 14 09:52:25 2008
@@ -11,7 +11,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libdbix-class-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/inc/Module/Install/Fetch.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/libdbix-class-perl/current/inc/Module/Install/Fetch.pm Fri Mar 14 09:52:25 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libdbix-class-perl/current/inc/Module/Install/Include.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/inc/Module/Install/Include.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/inc/Module/Install/Include.pm (original)
+++ branches/upstream/libdbix-class-perl/current/inc/Module/Install/Include.pm Fri Mar 14 09:52:25 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libdbix-class-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/inc/Module/Install/Makefile.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libdbix-class-perl/current/inc/Module/Install/Makefile.pm Fri Mar 14 09:52:25 2008
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libdbix-class-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/inc/Module/Install/Metadata.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libdbix-class-perl/current/inc/Module/Install/Metadata.pm Fri Mar 14 09:52:25 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libdbix-class-perl/current/inc/Module/Install/Scripts.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/inc/Module/Install/Scripts.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/inc/Module/Install/Scripts.pm (original)
+++ branches/upstream/libdbix-class-perl/current/inc/Module/Install/Scripts.pm Fri Mar 14 09:52:25 2008
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libdbix-class-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/inc/Module/Install/Win32.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/libdbix-class-perl/current/inc/Module/Install/Win32.pm Fri Mar 14 09:52:25 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libdbix-class-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/inc/Module/Install/WriteAll.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/libdbix-class-perl/current/inc/Module/Install/WriteAll.pm Fri Mar 14 09:52:25 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libdbix-class-perl/current/lib/DBIx/Class.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/lib/DBIx/Class.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/lib/DBIx/Class.pm (original)
+++ branches/upstream/libdbix-class-perl/current/lib/DBIx/Class.pm Fri Mar 14 09:52:25 2008
@@ -24,7 +24,7 @@
 # i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports
 # brain damage and presumably various other packaging systems too
 
-$VERSION = '0.08009';
+$VERSION = '0.08010';
 
 sub MODIFY_CODE_ATTRIBUTES {
   my ($class,$code, at attrs) = @_;
@@ -254,6 +254,8 @@
 
 Numa: Dan Sully <daniel at cpan.org>
 
+oyse: Øystein Torget <oystein.torget at dnv.com>
+
 paulm: Paul Makepeace
 
 penguin: K J Cheetham

Modified: branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Row.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Row.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Row.pm (original)
+++ branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Row.pm Fri Mar 14 09:52:25 2008
@@ -159,11 +159,9 @@
                        %{$self->{_inflated_column} || {}});
 
   if(!$self->{_rel_in_storage}) {
-    $source->storage->txn_begin;
 
     # The guard will save us if we blow out of this scope via die
-
-    $rollback_guard = Scope::Guard->new(sub { $source->storage->txn_rollback });
+    $rollback_guard = $source->storage->txn_scope_guard;
 
     ## Should all be in relationship_data, but we need to get rid of the
     ## 'filter' reltype..
@@ -246,8 +244,7 @@
         }
       }
     }
-    $source->storage->txn_commit;
-    $rollback_guard->dismiss;
+    $rollback_guard->commit;
   }
 
   $self->in_storage(1);
@@ -281,7 +278,7 @@
 required.
 
 Also takes an options hashref of C<< column_name => value> pairs >> to update
-first. But be awawre that the hashref will be passed to
+first. But be aware that the hashref will be passed to
 C<set_inflated_columns>, which might edit it in place, so dont rely on it being
 the same after a call to C<update>.  If you need to preserve the hashref, it is
 sufficient to pass a shallow copy to C<update>, e.g. ( { %{ $href } } )
@@ -767,7 +764,7 @@
 =head2 id
 
 Returns the primary key(s) for a row. Can't be called as a class method.
-Actually implemented in L<DBIx::Class::Pk>
+Actually implemented in L<DBIx::Class::PK>
 
 =head2 discard_changes
 
@@ -776,7 +773,7 @@
 
 This method can also be used to refresh from storage, retrieving any
 changes made since the row was last read from storage. Actually
-implemented in L<DBIx::Class::Pk>
+implemented in L<DBIx::Class::PK>
 
 =cut
 

Modified: branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Schema.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Schema.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Schema.pm (original)
+++ branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Schema.pm Fri Mar 14 09:52:25 2008
@@ -734,6 +734,15 @@
   $self->storage->txn_do(@_);
 }
 
+sub txn_scope_guard {
+  my $self = shift;
+
+  $self->storage or $self->throw_exception
+    ('txn_scope_guard called on $schema without storage');
+
+  $self->storage->txn_scope_guard(@_);
+}
+
 =head2 txn_begin
 
 Begins a transaction (does nothing if AutoCommit is off). Equivalent to

Modified: branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Schema/Versioned.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Schema/Versioned.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Schema/Versioned.pm (original)
+++ branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Schema/Versioned.pm Fri Mar 14 09:52:25 2008
@@ -180,12 +180,7 @@
 
     $self->backup();
 
-    $self->run_upgrade(qr/create/i);
-    $self->run_upgrade(qr/alter table .*? add/i);
-    $self->run_upgrade(qr/alter table .*? (?!drop)/i);
-    $self->run_upgrade(qr/alter table .*? drop/i);
-    $self->run_upgrade(qr/drop/i);
-#    $self->run_upgrade(qr//i);
+    $self->run_upgrade();
 
     my $vschema = DBIx::Class::Version->connect(@{$self->storage->connect_info()});
     my $vtable = $vschema->resultset('Table');
@@ -198,6 +193,7 @@
 sub run_upgrade
 {
     my ($self, $stm) = @_;
+    $stm ||= qr//;
 #    print "Reg: $stm\n";
     my @statements = grep { $_ =~ $stm } @{$self->_filedata};
 #    print "Statements: ", join("\n", @statements), "\n";
@@ -234,20 +230,6 @@
   {
     my ($self) = @_;
     # my special backup process
-  }
-
-  sub upgrade
-  {
-    my ($self) = @_;
-
-    ## overridable sub, per default just runs all the commands.
-
-    $self->run_upgrade(qr/create/i);
-    $self->run_upgrade(qr/alter table .*? add/i);
-    $self->run_upgrade(qr/alter table .*? (?!drop)/i);
-    $self->run_upgrade(qr/alter table .*? drop/i);
-    $self->run_upgrade(qr/drop/i);
-    $self->run_upgrade(qr//i);   
   }
 
 =head1 DESCRIPTION
@@ -308,6 +290,9 @@
 C<upgrade> method, running whichever commands you specify via the
 regex in the parameter.
 
+B<NOTE:> Since SQL::Translator 0.09000 it is better to just run all statmets
+in the order given, since the SQL produced is of better quality.
+
 =head2 upgrade_directory
 
 Use this to set the directory your upgrade files are stored in.

Modified: branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Storage.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Storage.pm?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Storage.pm (original)
+++ branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Storage.pm Fri Mar 14 09:52:25 2008
@@ -8,6 +8,7 @@
 use Scalar::Util qw/weaken/;
 use Carp::Clan qw/^DBIx::Class/;
 use IO::File;
+use DBIx::Class::Storage::TxnScopeGuard;
 
 __PACKAGE__->mk_group_accessors('simple' => qw/debug debugobj schema/);
 __PACKAGE__->mk_group_accessors('inherited' => 'cursor_class');
@@ -261,6 +262,18 @@
 
 sub txn_rollback { die "Virtual method!" }
 
+=for comment
+
+=head2 txn_scope_guard
+
+Return an object that does stuff.
+
+=cut
+
+sub txn_scope_guard {
+  return DBIx::Class::Storage::TxnScopeGuard->new($_[0]);
+}
+
 =head2 sql_maker
 
 Returns a C<sql_maker> object - normally an object of class

Added: branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Storage/TxnScopeGuard.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Storage/TxnScopeGuard.pm?rev=17420&op=file
==============================================================================
--- branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Storage/TxnScopeGuard.pm (added)
+++ branches/upstream/libdbix-class-perl/current/lib/DBIx/Class/Storage/TxnScopeGuard.pm Fri Mar 14 09:52:25 2008
@@ -1,0 +1,96 @@
+package # Hide from pause for now - till we get it working
+  DBIx::Class::Storage::TxnScopeGuard;
+
+use strict;
+use warnings;
+
+sub new {
+  my ($class, $storage) = @_;
+
+  $storage->txn_begin;
+  bless [ 0, $storage ], ref $class || $class;
+}
+
+sub commit {
+  my $self = shift;
+
+  $self->[1]->txn_commit;
+  $self->[0] = 1;
+}
+
+sub DESTROY {
+  my ($dismiss, $storage) = @{$_[0]};
+
+  return if $dismiss;
+
+  my $exception = $@;
+
+  $DB::single = 1;
+
+  local $@;
+  eval { $storage->txn_rollback };
+  my $rollback_exception = $@;
+  if($rollback_exception) {
+    my $exception_class = "DBIx::Class::Storage::NESTED_ROLLBACK_EXCEPTION";
+
+    $storage->throw_exception(
+      "Transaction aborted: ${exception}. "
+      . "Rollback failed: ${rollback_exception}"
+    ) unless $rollback_exception =~ /$exception_class/;
+  }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+DBIx::Class::Storage::TxnScopeGuard
+
+=head1 SYNOPSIS
+
+ sub foo {
+   my ($self, $schema) = @_;
+
+   my $guard = $schema->txn_scope_guard;
+
+   # Multiple database operations here
+
+   $guard->commit;
+ }
+
+=head1 DESCRIPTION
+
+An object that behaves much like L<Scope::Guard>, but hardcoded to do the
+right thing with transactions in DBIx::Class. 
+
+=head1 METHODS
+
+=head2 new
+
+Creating an instance of this class will start a new transaction. Expects a
+L<DBIx::Class::Storage> object as its only argument.
+
+=head2 commit
+
+Commit the transaction, and stop guarding the scope. If this method is not
+called (i.e. an exception is thrown) and this object goes out of scope then
+the transaction is rolled back.
+
+=cut
+
+=head1 SEE ALSO
+
+L<DBIx::Class::Schema/txn_scope_guard>.
+
+=head1 AUTHOR
+
+Ash Berlin, 2008.
+
+Insipred by L<Scope::Guard> by chocolateboy.
+
+This module is free software. It may be used, redistributed and/or modified
+under the same terms as Perl itself.
+
+=cut

Added: branches/upstream/libdbix-class-perl/current/scope-guard.patch
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/scope-guard.patch?rev=17420&op=file
==============================================================================
--- branches/upstream/libdbix-class-perl/current/scope-guard.patch (added)
+++ branches/upstream/libdbix-class-perl/current/scope-guard.patch Fri Mar 14 09:52:25 2008
@@ -1,0 +1,76 @@
+=== lib/DBIx/Class/Row.pm
+==================================================================
+--- lib/DBIx/Class/Row.pm	(revision 14032)
++++ lib/DBIx/Class/Row.pm	(local)
+@@ -159,12 +159,10 @@
+                        %{$self->{_inflated_column} || {}});
+ 
+   if(!$self->{_rel_in_storage}) {
+-    $source->storage->txn_begin;
+ 
+     # The guard will save us if we blow out of this scope via die
++    $rollback_guard = $source->storage->txn_scope_guard;
+ 
+-    $rollback_guard = Scope::Guard->new(sub { $source->storage->txn_rollback });
+-
+     ## Should all be in relationship_data, but we need to get rid of the
+     ## 'filter' reltype..
+     ## These are the FK rels, need their IDs for the insert.
+@@ -246,8 +244,7 @@
+         }
+       }
+     }
+-    $source->storage->txn_commit;
+-    $rollback_guard->dismiss;
++    $rollback_guard->commit;
+   }
+ 
+   $self->in_storage(1);
+=== lib/DBIx/Class/Storage/TxnScopeGuard.pm
+==================================================================
+--- lib/DBIx/Class/Storage/TxnScopeGuard.pm	(revision 14032)
++++ lib/DBIx/Class/Storage/TxnScopeGuard.pm	(local)
+@@ -0,0 +1,26 @@
++package DBIx::Class::Storage::TxnScopeGuard;
++
++use strict;
++use warnings;
++
++sub new {
++  my ($class, $storage) = @_;
++
++  $storage->txn_begin;
++  bless [ 0, $storage ], ref $class || $class;
++}
++
++sub commit {
++  my $self = shift;
++
++  $self->[1]->txn_commit;
++  $self->[0] = 1;
++}
++
++sub DESTROY {
++  my ($dismiss, $storage) = @$_[0];
++
++  $storage->txn_rollback unless $dismiss;
++}
++
++1;
+=== lib/DBIx/Class/Storage.pm
+==================================================================
+--- lib/DBIx/Class/Storage.pm	(revision 14032)
++++ lib/DBIx/Class/Storage.pm	(local)
+@@ -261,6 +261,12 @@
+ 
+ sub txn_rollback { die "Virtual method!" }
+ 
++sub txn_scope_guard {
++  my ($self) = @_;
++
++  return DBIx::Class::Storage::TxnScopeGuard->new($self);
++}
++
+ =head2 sql_maker
+ 
+ Returns a C<sql_maker> object - normally an object of class

Modified: branches/upstream/libdbix-class-perl/current/t/81transactions.t
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/t/81transactions.t?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/t/81transactions.t (original)
+++ branches/upstream/libdbix-class-perl/current/t/81transactions.t Fri Mar 14 09:52:25 2008
@@ -2,12 +2,13 @@
 use warnings;  
 
 use Test::More;
+use Test::Exception;
 use lib qw(t/lib);
 use DBICTest;
 
 my $schema = DBICTest->init_schema();
 
-plan tests => 54;
+plan tests => 67;
 
 my $code = sub {
   my ($artist, @cd_titles) = @_;
@@ -236,3 +237,99 @@
     my $err = $@;
     ok(($err eq ''), 'Pre-connection nested transactions.');
 }
+
+# Test txn_rollback with nested
+{
+  local $TODO = "Work out how this should work";
+  my $local_schema = DBICTest->init_schema();
+
+  my $artist_rs = $local_schema->resultset('Artist');
+  throws_ok {
+   
+    $local_schema->txn_begin;
+    $artist_rs->create({ name => 'Test artist rollback 1'});
+    $local_schema->txn_begin;
+    is($local_schema->storage->transaction_depth, 2, "Correct transaction depth");
+    $artist_rs->create({ name => 'Test artist rollback 2'});
+    $local_schema->txn_rollback;
+  } qr/Not sure what this should be.... something tho/, "Rolled back okay";
+  is($local_schema->storage->transaction_depth, 0, "Correct transaction depth");
+
+  ok(!$artist_rs->find({ name => 'Test artist rollback 1'}), "Test Artist not created")
+    || $artist_rs->find({ name => 'Test artist rollback 1'})->delete;
+}
+
+# Test txn_scope_guard
+{
+  local $TODO = "Work out how this should work";
+  my $schema = DBICTest->init_schema();
+
+  is($schema->storage->transaction_depth, 0, "Correct transaction depth");
+  my $artist_rs = $schema->resultset('Artist');
+  throws_ok {
+   my $guard = $schema->txn_scope_guard;
+
+
+    $artist_rs->create({
+      name => 'Death Cab for Cutie',
+      made_up_column => 1,
+    });
+    
+   $guard->commit;
+  } qr/No such column made_up_column.*?line 16/, "Error propogated okay";
+
+  ok(!$artist_rs->find({name => 'Death Cab for Cutie'}), "Artist not created");
+
+  my $inner_exception;
+  eval {
+    outer($schema, 1);
+  };
+  is($@, $inner_exception, "Nested exceptions propogated");
+
+  ok(!$artist_rs->find({name => 'Death Cab for Cutie'}), "Artist not created");
+
+
+  eval {
+    # The 0 arg says done die, just let the scope guard go out of scope 
+    # forcing a txn_rollback to happen
+    outer($schema, 0);
+  };
+  is($@, "Not sure what we want here, but something", "Rollback okay");
+
+  ok(!$artist_rs->find({name => 'Death Cab for Cutie'}), "Artist not created");
+
+  sub outer {
+    my ($schema) = @_;
+   
+    my $guard = $schema->txn_scope_guard;
+    $schema->resultset('Artist')->create({
+      name => 'Death Cab for Cutie',
+    });
+    inner(@_);
+    $guard->commit;
+  }
+
+  sub inner {
+    my ($schema, $fatal) = @_;
+    my $guard = $schema->txn_scope_guard;
+
+    my $artist = $artist_rs->find({ name => 'Death Cab for Cutie' });
+
+    is($schema->storage->transaction_depth, 2, "Correct transaction depth");
+    undef $@;
+    eval {
+      $artist->cds->create({ 
+        title => 'Plans',
+        year => 2005, 
+        $fatal ? ( foo => 'bar' ) : ()
+      });
+    };
+    if ($@) {
+      # Record what got thrown so we can test it propgates out properly.
+      $inner_exception = $@;
+      die $@;
+    }
+
+    # See what happens if we dont $guard->commit;
+  }
+}

Modified: branches/upstream/libdbix-class-perl/current/t/94versioning.t
URL: http://svn.debian.org/wsvn/branches/upstream/libdbix-class-perl/current/t/94versioning.t?rev=17420&op=diff
==============================================================================
--- branches/upstream/libdbix-class-perl/current/t/94versioning.t (original)
+++ branches/upstream/libdbix-class-perl/current/t/94versioning.t Fri Mar 14 09:52:25 2008
@@ -5,9 +5,9 @@
 use File::Spec;
 
 BEGIN {
-    eval "use DBD::SQLite; use SQL::Translator 0.08;";
+    eval "use DBD::SQLite; use SQL::Translator 0.09;";
     plan $@
-        ? ( skip_all => 'needs DBD::SQLite and SQL::Translator 0.08 for testing' )
+        ? ( skip_all => 'needs DBD::SQLite and SQL::Translator 0.09 for testing' )
         : ( tests => 6 );
 }
 




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