Name

getCurrentForm — retrieves form values from the current CGI request

Synopsis

my $form = getCurrentForm();
my $value = getCurrentForm($name);

With no parameters, getCurrentForm retrieves a hash reference of the current form information passed via user request. If the optional $name parameter is supplied, it returns only the associated value, if it exists, and the undefined value otherwise. This is generally useful only when running in the web server. However, if createEnvironment is called and no virtual user is provided, form values will be populated from @ARGV. This feature is rarely used. Slash::Utility exports this function.

Example

use Slash::Utility;
my $form = getCurrentForm();

my $op = getCurrentForm('op');

Get Running Weblogs with Slash now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.