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