pre_page — custom subroutine to run after Variable substitution, before interpolation
This pragma defines a Sub or GlobalSub
to run
after Variable substitution and
before tags are interpolated on a page. A
reference to the page contents
is passed to the subroutine.
Interchange 5.7.0 (1/1 contexts shown):
Source: lib/Vend/Interpolate.pm (rev. 2.310 from Sat Dec 6 00:01:23 2008)
Line 629 (context shows lines 619-633 in vars_and_comments():598)
$$html =~ s/$Evar/dynamic_var($1) || $Global::Variable->{$1}/ge;
$$html =~ s/$Cvar/dynamic_var($1)/ge;
}
else {
$$html =~ s/$Evar/$::Variable->{$1} || $Global::Variable->{$1}/ge
and
$$html =~ s/$Evar/$::Variable->{$1} || $Global::Variable->{$1}/ge;
$$html =~ s/$Cvar/$::Variable->{$1}/g;
}
if($::Pragma->{pre_page}) {
Vend::Dispatch::run_macro($::Pragma->{pre_page}, $html);
}
# Strip out [comment] [/comment] blocks