MooseX::TransactionalMethods man page on Darwin

Man page or keyword search:  
man Server   23457 pages
apropos Keyword Search (all sections)
Output format
Darwin logo
[printable version]

MooseX::TransactionalMUserdContributed Perl DocMooseX::TransactionalMethods(3)

NAME
       MooseX::TransactionalMethods - Syntax sugar for transactional methods

SYNOPSIS
	 package Foo::Bar;
	 use MooseX::TransactionalMethods; # includes Moose

	 has schema => (is => 'ro');

	 transactional foo => sub {
	    # this is going to happen inside a transaction
	 };

DESCRIPTION
       This method exports the "transactional" declarator that will enclose
       the method in a txn_do call.

DECLARATOR
       transactional $name => $code
	   When you declare with only the name and the coderef, the wrapper
	   will call 'schema' on your class to fetch the schema object on
	   which it will call txn_do to enclose your coderef.

       transactional $name => $schema, $code
	   When you declare sending the schema object, it will store it in the
	   method metaclass and use it directly without any calls to this
	   object.

	   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.

AUTHORS
       Daniel Ruoso <daniel@ruoso.com>

       With help from rafl and doy from #moose.

COPYRIGHT AND LICENSE
       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.

perl v5.16.2			  2010-11-29   MooseX::TransactionalMethods(3)
[top]

List of man pages available for Darwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net