| 1 | ############################################################################## | ||
| 2 | ## | ||
| 3 | ## Web::Reactor application machinery | ||
| 4 | ## 2013-2016 (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 | use parent 'Web::Reactor::Base'; | ||
| 14 | |||
| 15 | sub new | ||
| 16 | { | ||
| 17 | my $class = shift; | ||
| 18 | my %env = @_; | ||
| 19 | |||
| 20 | $class = ref( $class ) || $class; | ||
| 21 | my $self = { | ||
| 22 | 'ENV' => \%env, | ||
| 23 | 'ACT_PKG_CACHE' => {}, | ||
| 24 | }; | ||
| 25 | bless $self, $class; | ||
| 26 | # rcd_log( "debug: $self created" ); | ||
| 27 | |||
| 28 | return $self; | ||
| 29 | } | ||
| 30 | |||
| 31 | # calls an action (function) by name | ||
| 32 | # args: | ||
| 33 | # name -- function/action name | ||
| 34 | # %args -- array used as named hash arguments | ||
| 35 | # args hash keys: | ||
| 36 | # ARGS -- hash reference of attributes/arguments passed to the action | ||
| 37 | # returns: | ||
| 38 | # result text to be replaced in output | ||
| 39 | sub call { die "Web::Reactor::Acts::*::call() is not implemented!"; } | ||
| 40 | |||
| 41 | #sub DESTROY | ||
| 42 | #{ | ||
| 43 | # my $self = shift; | ||
| 44 | # | ||
| 45 | # print "DESTROY: Reactor: $self\n"; | ||
| 46 | #} | ||
| 47 | |||
| 48 | ############################################################################## | ||
| 49 | 1; | ||
| 50 | ###EOF######################################################################## |