Name

pre_page — custom subroutine to run after Variable substitution, before interpolation

VALUE

subroutine_name

DEFAULT

None

DESCRIPTION

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.

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

pre_page is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0 (1/1 contexts shown):

Source: lib/Vend/Interpolate.pm
Line 624 (context shows lines 614-628 in vars_and_comments():593)

$$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  blocks

AUTHORS

Interchange Development Group

SEE ALSO

post_page(7ic), init_page(7ic)

DocBook! Interchange!