>>>>> "Douglas" == Douglas S Sparling <[EMAIL PROTECTED]> writes:
Douglas> Hi all,
Douglas> Another quick Apache::Request question...
Douglas> I need to access a request parameter in a Plugin.I
Douglas> know with Apache::Template you can use 'params'. I'm
Douglas> getting the param in the template and then access it
Douglas> in my Plugin via stash (see snippet below). Is there a
Douglas> way to access the param directly in the plugin so I
Douglas> don't have to clutter my template with the extra tags?
Douglas> Template (index.html):
Douglas> --
Douglas> [% uc_form_year = params.uc_form_year %]
Douglas> [% USE FeatureView %]
Douglas> UC::Template::Plugin::FeatureView
Douglas> --
Douglas> sub new {
Douglas> my ($class, $context, @params) = @_;
Douglas> my $stash = $context->stash();
Douglas> my $uc_form_year = $stash->get('uc_form_year');
Why not just
my $uc_form_year = $stash->get('params', 0, 'uc_form_year');
since it's already in the stash?
"perldoc -t Template::Manual::Internals" for more info...
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!