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

NAME

Tk::TM::Try - Tk Transaction Manager Error processing functions. See Tk::TM::Lib for main descriptions and principles.

SYNOPSIS

 use Tk::TM::Try;
 Try sub{
      TryHdr('title','stage');
      TryHdr(undef,'stage1');
     }
    ,sub{
     };
 Try(sub{...},0);
 TryDBI $dbh
       ,sub{ #transaction
        }
       ,sub{ #after rollback
        };

DESCRIPTION

    This module implements error processing functions may be used (or not be used) in application.

VARIABLES

     use vars qw($ErrorDie $Error);

    $Tk::TM::Try::ErrorDie

    Die if error occurred. Default is false outside Try and true inside.

    $Tk::TM::Try::Error

    Last error occurred. Value is $@.

FUNCTIONS

     @EXPORT = qw(Try(@) TryDBI(@) TryHdr);

    Try ( eval {...}, default ) -> result

    Try ( eval {...}, \&catch ) -> result

    Try ( sub {...}, ... ) -> result

    Try-Catch construction. Function Try returns result of eval on success. If error occurred (determined by $@), it returns default value or result of catch evaluation.

    TryDBI ( ?dbh, sub {...}, default ) -> result

    TryDBI ( ?dbh, sub {...}, \&catch ) -> result

    Try-Catch construction for database transaction. Default database handle may be given from current data object or $Tk::TM::Common::DBH. $dbh->{AutoCommit} and $dbh->{RaiseError} are used inside TryDBI.

    TryHdr (subject, stage)

    TryHdr (undef, stage)

    Declare title and/or stage name of transaction to insert into $@ inside Try. May be used only inside Try(sub{},...).

VERSION

"02/04/2000"

Created.

TO DO:

- Approve

- Debug and Test

AUTHOR

    Andrew V Makarow <makarow@mail.com>, Denis E Medvedyuk <demed@mail.com>

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 47:

You can't have =items (as at line 51) unless the first thing after the =over is an =item

Around line 69:

You can't have =items (as at line 74) unless the first thing after the =over is an =item