The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

EntityModel::Util - helper functions for EntityModel

VERSION

version 0.102

SYNOPSIS

METHODS

as_transaction

Helper function to run the given block as a transaction.

Takes a block, which will be run under a transaction, and the following optional named parameters:

  • success - coderef to call on successful completion. The transaction will be committed before this is called.

  • failure - coderef to call on failure. This will be called after the transaction has been rolled back.

  • goodbye - coderef to call after success/failure. This will always be called regardless of status, and can be used to chain events similar to CPS.

Returns the transaction in list or scalar context, and in void context will clean up the transaction automatically.

INHERITED METHODS

EntityModel::BaseClass

clone, dump, new, sap

Exporter

as_heavy, export, export_fail, export_ok_tags, export_tags, export_to_level, import, require_version