Bric::App::Event(3p)  User Contributed Perl Documentation Bric::App::Event(3p)



NAME
       Bric::App::Event - Exports simple functions for managing events.

VERSION
       $LastChangedRevision$

DATE
       $LastChangedDate: 2006-03-18 01:26:34 +0100 (Sat, 18 Mar 2006) $

SYNOPSIS
         use Bric::App::Event qw(:all);
         log_event($name, $obj, $init);
         commit_events();

DESCRIPTION
INTERFACE
   Constructors
       NONE.

   Destructors
       $p->DESTROY
           Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.

           Throws: NONE.

           Side Effects: NONE.

           Notes: NONE.

   Public Class Methods
       NONE.

   Public Functions
       my $bool = log_event($key_name, $obj, $init)
           Queues an event for logging. Pass in the following arguments:

           $key_name
               The key name of the event to log. Required.

           $obj
               The object for which the event is being logged. Required.

           $init
               The attribute values for this event. Required for those event
               types that require them. See Bric::Util::EventType and
               Bric::Util::Event for more information.

               Throws: NONE.

               Side Effects: NONE.

               Notes: NONE.

       my $bool = commit_events()
           Goes through the queue of events created by calls to log_event()
           and actually logs them to the database.

           Throws: See Bric::Util::Event::new().

           Side Effects: NONE.

           Notes: NONE.

       my $bool = clear_events()
           Deletes queue of events so that they won't be logged. Used to
           prevent event logging when an error has occurred and all changes
           have been rolled back.

           Throws: NONE.

           Side Effects: NONE.

           Notes: NONE.

PRIVATE
   Private Class Methods
       NONE.

   Private Instance Methods
       NONE.

   Private Functions
       NONE.

NOTES
       NONE.

AUTHOR
       David Wheeler <david@justatheory.com>

SEE ALSO
       Bric, Bric::Util::Event



perl v5.12.2                      2006-03-17              Bric::App::Event(3p)
