@@ -9,6 +9,7 @@ use YATT::Lite -as_base, qw/*SYS *CON
9
9
use YATT::Lite::MFields qw/ cf_dir_config
10
10
cf_use_subpath
11
11
cf_overwrite_status_code_for_errors_as
12
+ cf_ext_public_action
12
13
13
14
Action/ ;
14
15
@@ -25,6 +26,12 @@ use YATT::Lite::Util qw/cached_in ckeval
25
26
26
27
use YATT::Lite::Error;
27
28
29
+ sub after_new {
30
+ (my MY $self ) = @_ ;
31
+ $self -> SUPER::after_new;
32
+ $self -> {cf_ext_public_action } //= $self -> default_ext_public_action;
33
+ }
34
+
28
35
# sub handle_ydo, _do, _psgi...
29
36
30
37
sub handle {
@@ -106,6 +113,8 @@ sub prepare_part_handler {
106
113
# Action handling
107
114
# ========================================
108
115
116
+ sub default_ext_public_action {' ydo' }
117
+
109
118
sub find_handler {
110
119
(my MY $self , my ($ext , $file , $con )) = @_ ;
111
120
my PROP $prop = $con -> prop;
@@ -144,6 +153,7 @@ sub get_action_handler {
144
153
($self -> {Action } //= {}, $path , $self , undef , sub {
145
154
# first time.
146
155
my ($self , $sys , $path ) = @_ ;
156
+ return undef unless $path =~ m {\. $self ->{cf_ext_public_action}\z } ;
147
157
my $age = -M $path ;
148
158
return undef if not defined $age and $can_be_missing ;
149
159
my $sub = compile_file_in(ref $self , $path );
0 commit comments