From: Chris W. <la...@us...> - 2005-03-29 17:02:04
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv614 Modified Files: Action.pm Log Message: update docs to recognize that init_at_startup() gets the action name Index: Action.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action.pm,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** Action.pm 17 Mar 2005 14:57:56 -0000 1.73 --- Action.pm 29 Mar 2005 17:01:54 -0000 1.74 *************** *** 1236,1246 **** When OpenInteract starts up it will call C<init_at_startup()> on every ! configured action class. (The class ! L<OpenInteract2::Setup::InitializeActions> actually does this.) This ! is useful for reading static (or rarely changing) information once and ! caching the results. Since the L<OpenInteract2::Context> object is ! guaranteed to have been created when this is called you can grab a ! database handle and slurp all the lookup entries from a table into a ! lexical data structure. Here is an example: --- 1236,1250 ---- When OpenInteract starts up it will call C<init_at_startup()> on every ! configured action class, passing in the name used to configure this ! action as the only argument. (The class ! L<OpenInteract2::Setup::InitializeActions> is the one that actually ! does this.) If you've got multiple actions mapped to the same class ! your initialization method will get called multiple times. ! ! This is useful for reading static (or rarely changing) information ! once and caching the results. Since the L<OpenInteract2::Context> ! object is guaranteed to have been created when this is called you can ! grab a database handle and slurp all the lookup entries from a table ! into a lexical data structure. Here is an example: *************** *** 1257,1261 **** sub init_at_startup { ! my ( $class ) = @_; $log ||= get_logger( LOG_APP ); my $publisher_list = eval { --- 1261,1265 ---- sub init_at_startup { ! my ( $class, $action_name ) = @_; $log ||= get_logger( LOG_APP ); my $publisher_list = eval { |