AxKit-XSP-PerForm
view release on metacpan or search on metacpan
789790791792793794795796797798799800801802803804805806807808809
sub
submit_save {
my
(
$ctxt
) =
@_
;
# save values to a database
warn
(
"User: "
,
$ctxt
->{Form}{firstname},
" "
,
$ctxt
->{Form}{lastname},
"\n"
);
}
Now these methods need to be global to your XSP page, rather than
"closures"
within the XSP page
's main handler routine. How do you do that? Well it'
s
simple. Just put them within a <xsp:logic> section
before
any user
defined
format
(something I
do
a lot), your page might be constructed as follows
(namespace declarations omitted
for
brevity):
<xsp:page>
<xsp:logic>
... form logic here ...
</xsp:logic>
<html>
<head><title>An Example Form</title></head>
( run in 0.230 second using v1.01-cache-2.11-cpan-00829025b61 )