MooseX::TransactionalMethods(3) | User Contributed Perl Documentation | MooseX::TransactionalMethods(3) |
MooseX::TransactionalMethods - Syntax sugar for transactional methods
package Foo::Bar; use MooseX::TransactionalMethods; # includes Moose has schema => (is => 'ro'); transactional foo => sub { # this is going to happen inside a transaction };
This method exports the "transactional" declarator that will enclose the method in a txn_do call.
NOTE THAT MIXING DECLARTIONS WITH SCHEMA AND WITHOUT SCHEMA WILL LEAD TO PAINFULL CONFUSION SINCE THE WRAPPING IS SPECIFIC TO THAT CLASS AND THE BEHAVIOR IS NOT MODIFIED WHEN YOU OVERRIDE THE METHOD. PREFER USING THE DYNAMIC DECLARATOR WHEN POSSIBLE.
Daniel Ruoso <daniel@ruoso.com>
With help from rafl and doy from #moose.
Copyright 2010 by Daniel Ruoso et al
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2015-03-26 | perl v5.34.0 |