[Catalyst-commits] r7704 - in Catalyst-Controller-DBIC-Transaction/1.0/tags: . 0.2 0.2/lib/Catalyst/Action/DBIC 0.2/lib/Catalyst/Controller/DBIC

ruoso at dev.catalyst.perl.org ruoso at dev.catalyst.perl.org
Tue May 6 23:35:15 BST 2008


Author: ruoso
Date: 2008-05-06 23:35:14 +0100 (Tue, 06 May 2008)
New Revision: 7704

Added:
   Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/
   Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/Changes
   Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/MANIFEST
   Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/Makefile.PL
   Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/README
   Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/
   Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Action/DBIC/Transaction.pm
   Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Controller/DBIC/Transaction.pm
   Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/t/
Removed:
   Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Action/DBIC/Transaction.pm
   Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Controller/DBIC/Transaction.pm
Log:
releasing dumb fix

Copied: Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2 (from rev 7697, Catalyst-Controller-DBIC-Transaction/1.0/trunk)

Copied: Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/Changes (from rev 7700, Catalyst-Controller-DBIC-Transaction/1.0/trunk/Changes)
===================================================================
--- Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/Changes	                        (rev 0)
+++ Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/Changes	2008-05-06 22:35:14 UTC (rev 7704)
@@ -0,0 +1,5 @@
+------------------------------------------------------------------------
+r7697 | matthewt | 2008-05-06 16:57:10 -0300 (Ter, 06 Mai 2008) | 1 line
+
+created new dir for ruoso
+------------------------------------------------------------------------

Copied: Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/MANIFEST (from rev 7700, Catalyst-Controller-DBIC-Transaction/1.0/trunk/MANIFEST)
===================================================================
--- Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/MANIFEST	                        (rev 0)
+++ Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/MANIFEST	2008-05-06 22:35:14 UTC (rev 7704)
@@ -0,0 +1,9 @@
+Changes
+lib/Catalyst/Action/DBIC/Transaction.pm
+lib/Catalyst/Controller/DBIC/Transaction.pm
+Makefile.PL
+MANIFEST
+README
+t/01_basic.t
+t/lib/TestApp/Controller/Foo.pm
+t/lib/TestApp.pm

Copied: Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/Makefile.PL (from rev 7700, Catalyst-Controller-DBIC-Transaction/1.0/trunk/Makefile.PL)
===================================================================
--- Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/Makefile.PL	                        (rev 0)
+++ Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/Makefile.PL	2008-05-06 22:35:14 UTC (rev 7704)
@@ -0,0 +1,13 @@
+use 5.008008;
+use ExtUtils::MakeMaker;
+# See lib/ExtUtils/MakeMaker.pm for details of how to influence
+# the contents of the Makefile that is written.
+WriteMakefile(
+    NAME              => 'Catalyst::Controller::DBIC::Transaction',
+    VERSION_FROM      => 'lib/Catalyst/Controller/DBIC/Transaction.pm', # finds $VERSION
+    PREREQ_PM         => { Catalyst::Runtime => 5.7011, Class::C3 => 0,
+                           Sub::Name => 0},
+    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
+      (ABSTRACT_FROM  => 'lib/Catalyst/Controller/DBIC/Transaction.pm', # retrieve abstract from module
+       AUTHOR         => 'Daniel Ruoso <daniel at ruoso.com>') : ()),
+);

Copied: Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/README (from rev 7700, Catalyst-Controller-DBIC-Transaction/1.0/trunk/README)
===================================================================
--- Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/README	                        (rev 0)
+++ Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/README	2008-05-06 22:35:14 UTC (rev 7704)
@@ -0,0 +1,35 @@
+NAME
+    Catalyst::Controller::DBIC::Transaction - Encloses actions into
+    transactions
+
+SYNOPSIS
+      use base qw(Catalyst::Controller::DBIC::Transaction);
+      sub foo :DBICTransaction('DB::Schema') {
+         do $something or die $!;
+      }
+
+DESCRIPTION
+    This module enables the use of automatic transaction support into
+    Catalyst Actions, it will associate a given action with the appropriate
+    action class and save the DBIx::Class::Schema class name for later use.
+
+    The action will be executed inside a txn_do, and a die inside that
+    method will cause the transaction to be rolled back, as documented in
+    DBIx::Class::Schema.
+
+    This method will not, on the other hand, handle that exception, since
+    txn_do will rethrow it. This means that this handling is not much
+    intrusive in the action processing flow.
+
+AUTHORS
+    Daniel Ruoso <daniel at ruoso.com>
+
+BUG REPORTS
+    Please submit all bugs regarding
+    "Catalyst::Controller::DBIC::Transaction" to
+    "bug-catalyst-controller-dbic-transaction at rt.cpan.org"
+
+LICENSE
+    This library is free software, you can redistribute it and/or modify it
+    under the same terms as Perl itself.
+

Copied: Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib (from rev 7698, Catalyst-Controller-DBIC-Transaction/1.0/trunk/lib)

Deleted: Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Action/DBIC/Transaction.pm
===================================================================
--- Catalyst-Controller-DBIC-Transaction/1.0/trunk/lib/Catalyst/Action/DBIC/Transaction.pm	2008-05-06 21:04:53 UTC (rev 7698)
+++ Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Action/DBIC/Transaction.pm	2008-05-06 22:35:14 UTC (rev 7704)
@@ -1,76 +0,0 @@
-{   package Catalyst::Action::DBIC::Transaction;
-    use strict;
-    use warnings;
-    use base qw(Catalyst::Action);
-
-    sub execute {
-        my $self = shift;
-        my ( $controller, $c ) = @_;
-
-        my $schema_class = $controller->_dbic_transaction_schemas->{$self->name}
-          or die 'No schema class defined for DBIC::Transaction ActionClass';
-
-        my $wantarray = wantarray;
-        my ($return, @return, $success);
-
-        my $sub = sub {
-            if ($wantarray) {
-                @return = $self->NEXT::execute(@_);
-            } else {
-                $return = $self->NEXT::execute(@_);
-            }
-        };
-
-        $schema_class->txn_do($sub);
-
-        if ($wantarray) {
-            return @return;
-        } else {
-            return $return;
-        }
-    }
-
-};
-1;
-
-=head1 NAME
-
-Catalyst::Action::DBIC::Transaction - Encloses actions into transactions
-
-=head1 SYNOPSIS
-
-  use base qw(Catalyst::Controller::DBIC::Transaction);
-  sub foo :DBICTransaction('DB::Schema') {
-     do $something or die $!;
-  }
-
-=head1 DESCRIPTION
-
-This module enables the use of automatic transaction support into
-Catalyst Actions, it will associate a given action with the
-appropriate action class and save the DBIx::Class::Schema class name
-for later use.
-
-The action will be executed inside a txn_do, and a die inside that
-method will cause the transaction to be rolled back, as documented in
-DBIx::Class::Schema.
-
-This method will not, on the other hand, handle that exception, since
-txn_do will rethrow it. This means that this handling is not much
-intrusive in the action processing flow.
-
-=head1 AUTHORS
-
-Daniel Ruoso <daniel at ruoso.com>
-
-=head1 BUG REPORTS
-
-Please submit all bugs regarding C<Catalyst::Controller::DBIC::Transaction> to
-C<bug-catalyst-controller-dbic-transaction at rt.cpan.org>
-
-=head1 LICENSE
-
-This library is free software, you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut

Copied: Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Action/DBIC/Transaction.pm (from rev 7699, Catalyst-Controller-DBIC-Transaction/1.0/trunk/lib/Catalyst/Action/DBIC/Transaction.pm)
===================================================================
--- Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Action/DBIC/Transaction.pm	                        (rev 0)
+++ Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Action/DBIC/Transaction.pm	2008-05-06 22:35:14 UTC (rev 7704)
@@ -0,0 +1,78 @@
+{   package Catalyst::Action::DBIC::Transaction;
+    use strict;
+    use warnings;
+    use base 'Catalyst::Action';
+    use Class::C3;
+    use Sub::Name 'subname';
+
+    sub execute {
+        my $self = shift;
+        my ( $controller, $c ) = @_;
+
+        my $schema_class = $controller->_dbic_transaction_schemas->{$self->name}
+          or die 'No schema class defined for DBIC::Transaction ActionClass';
+
+        my $wantarray = wantarray;
+        my ($return, @return, $success);
+
+        my $sub = subname 'Catalyst::Action::DBIC::Transaction::execute' => sub {
+            if ($wantarray) {
+                @return = $self->next::method($self, at _);
+            } else {
+                $return = $self->next::method($self, at _);
+            }
+        };
+
+        $schema_class->txn_do($sub);
+
+        if ($wantarray) {
+            return @return;
+        } else {
+            return $return;
+        }
+    }
+
+};
+1;
+
+=head1 NAME
+
+Catalyst::Action::DBIC::Transaction - Encloses actions into transactions
+
+=head1 SYNOPSIS
+
+  use base qw(Catalyst::Controller::DBIC::Transaction);
+  sub foo :DBICTransaction('DB::Schema') {
+     do $something or die $!;
+  }
+
+=head1 DESCRIPTION
+
+This module enables the use of automatic transaction support into
+Catalyst Actions, it will associate a given action with the
+appropriate action class and save the DBIx::Class::Schema class name
+for later use.
+
+The action will be executed inside a txn_do, and a die inside that
+method will cause the transaction to be rolled back, as documented in
+DBIx::Class::Schema.
+
+This method will not, on the other hand, handle that exception, since
+txn_do will rethrow it. This means that this handling is not much
+intrusive in the action processing flow.
+
+=head1 AUTHORS
+
+Daniel Ruoso <daniel at ruoso.com>
+
+=head1 BUG REPORTS
+
+Please submit all bugs regarding C<Catalyst::Controller::DBIC::Transaction> to
+C<bug-catalyst-controller-dbic-transaction at rt.cpan.org>
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut

Deleted: Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Controller/DBIC/Transaction.pm
===================================================================
--- Catalyst-Controller-DBIC-Transaction/1.0/trunk/lib/Catalyst/Controller/DBIC/Transaction.pm	2008-05-06 21:04:53 UTC (rev 7698)
+++ Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Controller/DBIC/Transaction.pm	2008-05-06 22:35:14 UTC (rev 7704)
@@ -1,63 +0,0 @@
-{   package Catalyst::Controller::DBIC::Transaction;
-
-    use strict;
-    use warnings;
-    use base qw(Catalyst::Controller);
-
-    __PACKAGE__->mk_accessors qw(_dbic_transaction_schemas);
-
-    sub _parse_DBICTransaction_attr {
-        my ($self, $c, $name, $value) = @_;
-
-        $self->_dbic_transaction_schemas({}) unless
-          $self->_dbic_transaction_schemas({});
-
-        $self->_dbic_transaction_schemas->{$name} = $value;
-
-        ( ActionClass => 'DBIC::Transaction' );
-    }
-
-};
-1;
-
-=head1 NAME
-
-Catalyst::Controller::DBIC::Transaction - Encloses actions into transactions
-
-=head1 SYNOPSIS
-
-  use base qw(Catalyst::Controller::DBIC::Transaction);
-  sub foo :DBICTransaction('DB::Schema') {
-     do $something or die $!;
-  }
-
-=head1 DESCRIPTION
-
-This module enables the use of automatic transaction support into
-Catalyst Actions, it will associate a given action with the
-appropriate action class and save the DBIx::Class::Schema class name
-for later use.
-
-The action will be executed inside a txn_do, and a die inside that
-method will cause the transaction to be rolled back, as documented in
-DBIx::Class::Schema.
-
-This method will not, on the other hand, handle that exception, since
-txn_do will rethrow it. This means that this handling is not much
-intrusive in the action processing flow.
-
-=head1 AUTHORS
-
-Daniel Ruoso <daniel at ruoso.com>
-
-=head1 BUG REPORTS
-
-Please submit all bugs regarding C<Catalyst::Controller::DBIC::Transaction> to
-C<bug-catalyst-controller-dbic-transaction at rt.cpan.org>
-
-=head1 LICENSE
-
-This library is free software, you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut

Copied: Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Controller/DBIC/Transaction.pm (from rev 7703, Catalyst-Controller-DBIC-Transaction/1.0/trunk/lib/Catalyst/Controller/DBIC/Transaction.pm)
===================================================================
--- Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Controller/DBIC/Transaction.pm	                        (rev 0)
+++ Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/lib/Catalyst/Controller/DBIC/Transaction.pm	2008-05-06 22:35:14 UTC (rev 7704)
@@ -0,0 +1,65 @@
+{   package Catalyst::Controller::DBIC::Transaction;
+
+    use strict;
+    use warnings;
+    use base 'Catalyst::Controller';
+
+    our $VERSION = '0.2';
+
+    __PACKAGE__->mk_accessors qw(_dbic_transaction_schemas);
+
+    sub _parse_DBICTransaction_attr {
+        my ($self, $c, $name, $value) = @_;
+
+        $self->_dbic_transaction_schemas({}) unless
+          $self->_dbic_transaction_schemas();
+
+        $self->_dbic_transaction_schemas->{$name} = $value;
+
+        ( ActionClass => 'Catalyst::Action::DBIC::Transaction' );
+    }
+
+};
+1;
+
+=head1 NAME
+
+Catalyst::Controller::DBIC::Transaction - Encloses actions into transactions
+
+=head1 SYNOPSIS
+
+  use base qw(Catalyst::Controller::DBIC::Transaction);
+  sub foo :DBICTransaction('DB::Schema') {
+     do $something or die $!;
+  }
+
+=head1 DESCRIPTION
+
+This module enables the use of automatic transaction support into
+Catalyst Actions, it will associate a given action with the
+appropriate action class and save the DBIx::Class::Schema class name
+for later use.
+
+The action will be executed inside a txn_do, and a die inside that
+method will cause the transaction to be rolled back, as documented in
+DBIx::Class::Schema.
+
+This method will not, on the other hand, handle that exception, since
+txn_do will rethrow it. This means that this handling is not much
+intrusive in the action processing flow.
+
+=head1 AUTHORS
+
+Daniel Ruoso <daniel at ruoso.com>
+
+=head1 BUG REPORTS
+
+Please submit all bugs regarding C<Catalyst::Controller::DBIC::Transaction> to
+C<bug-catalyst-controller-dbic-transaction at rt.cpan.org>
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut

Copied: Catalyst-Controller-DBIC-Transaction/1.0/tags/0.2/t (from rev 7699, Catalyst-Controller-DBIC-Transaction/1.0/trunk/t)




More information about the Catalyst-commits mailing list