| 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::Preprocessor; | ||
| 13 | use strict; | ||
| 14 | |||
| 15 | use parent 'Web::Reactor::Base'; | ||
| 16 | |||
| 17 | # constructs real filesystem/storage file name and load the page_text | ||
| 18 | # args: | ||
| 19 | # $page_name -- page name, it should be sanitized and load from file, | ||
| 20 | # storage, or sth. | ||
| 21 | # | ||
| 22 | # returns: | ||
| 23 | # page text | ||
| 24 | sub load_file { die "Web::Reactor::Preprocessor::*::load_file() is not implemented!"; } | ||
| 25 | |||
| 26 | # preprocesses page text to include sub-pages or execute actions inside | ||
| 27 | # args: | ||
| 28 | # $page_text -- page text, already load with load_file() | ||
| 29 | # | ||
| 30 | # returns: | ||
| 31 | # preprocessed page text | ||
| 32 | sub process { die "Web::Reactor::Preprocessor::*::process() is not implemented!"; } | ||
| 33 | |||
| 34 | #sub DESTROY | ||
| 35 | #{ | ||
| 36 | # my $self = shift; | ||
| 37 | # | ||
| 38 | # print "DESTROY: $self\n"; | ||
| 39 | #} | ||
| 40 | |||
| 41 | ############################################################################## | ||
| 42 | 1; | ||
| 43 | ###EOF######################################################################## |