Apache-BabyConnect

 view release on metacpan or  search on metacpan

configuration/dbconf/globalconf.pl  view on Meta::CPAN

# to 1 to rollback if you call exit() from within your program 
# (since exit() will eventually call DBI::BabyConnect::DESTROY),
# or if you end the class or program that uses DBI::BabyConnect 
# (as the DESTROY is the last to be called even in Apache::BabyConnect)
# In either case, whenever DESTROY is called, if the autorollback is 1 and autocommit is 0
# and the DBI execute has returned with failure, then the rollback is in effect.

# The caller can always catch and check the return value of a DBI::BabyConnect method
# to see if it has failed a DBI execute. Typically DBI::BabyConnect methods return undef
# whenever a DBI execute fails and therefore the caller can check the return
# value and decide on whether to call the DBI::BabyConnect object method rollback himself or not,
# therefore allowing the caller to continue to work with the instance of DBI::BabyConnect object 
# and its open DBI connection.
# Yet, you can configure the behavior of the DBI::BabyConnect object methods globally
# and tell the object methods to automatically rollback and exit on failure.

# This option is settable and will work only if AutoRollback is in effect for the
# DBI, because DBI::BabyConnect objects delegate all rollbacks to the DBI itself.
# DBI rollback is in effect if and only if:
#  RaiseError is 0 (it should be off because otherwise the DBI would have exited earlier due to the error)
#  AutoCommit is 0 (DBI will have no effect on rollback is AutoCommit is set to 1)
# DBI::BabyConnect will keep track of the success or failure of DBI execute(), hence deciding on
# what to do on failure.
#
# DBI will not exit if the conditions on the rollback are not met, but it will
# continue without effectively rolling back.
#
# For these DBI::BabyConnect objects that have been instantiated by loading the
# DBI::BabyConnect with PERSISTENT_OBJECT_ENABLED set to 1
#    use DBI::BabyConnect 1, 1 
# this option will do a rollback but the exit() is redirected to Apache::exit() as it 
# is documented by mod_perl, in which case only the perl script will exit at this point.



( run in 0.289 second using v1.01-cache-2.11-cpan-de7293f3b23 )