| 1 | ############################################################################## | ||
| 2 | ## | ||
| 3 | ## Web::Reactor application machinery | ||
| 4 | ## 2013 (c) Vladi Belperchinov-Shabanski "Cade" | ||
| 5 | ## <cade@bis.bg> <cade@biscom.net> <cade@cpan.org> | ||
| 6 | ## | ||
| 7 | ## LICENSE: GPLv2 | ||
| 8 | ## | ||
| 9 | ############################################################################## | ||
| 10 | package Web::Reactor::Actions; | ||
| 11 | use strict; | ||
| 12 | |||
| 13 | sub new | ||
| 14 | { | ||
| 15 | my $class = shift; | ||
| 16 | my %env = @_; | ||
| 17 | |||
| 18 | $class = ref( $class ) || $class; | ||
| 19 | my $self = { | ||
| 20 | 'ENV' => \%env, | ||
| 21 | 'ACT_PKG_CACHE' => {}, | ||
| 22 | }; | ||
| 23 | bless $self, $class; | ||
| 24 | # rcd_log( "debug: $self created" ); | ||
| 25 | |||
| 26 | return $self; | ||
| 27 | } | ||
| 28 | |||
| 29 | # calls an action (function) by name | ||
| 30 | # args: | ||
| 31 | # name -- function/action name | ||
| 32 | # %args -- array used as named hash arguments | ||
| 33 | # args hash keys: | ||
| 34 | # ARGS -- hash reference of attributes/arguments passed to the action | ||
| 35 | # returns: | ||
| 36 | # result text to be replaced in output | ||
| 37 | sub call { die "Web::Reactor::Acts::*::call() is not implemented!"; } | ||
| 38 | |||
| 39 | ############################################################################## | ||
| 40 | 1; | ||
| 41 | ###EOF######################################################################## |