The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CGI::Ex - CGI utility suite - makes powerful application writing fun and easy

CGI::Ex SYNOPSIS

### You probably don't want to use CGI::Ex directly
### You probably should use CGI::Ex::App instead.

my $cgix = CGI::Ex->new;

$cgix->print_content_type;

my $hash = $cgix->form;

if ($hash->{'bounce'}) {

    $cgix->set_cookie({
        name  => ...,
        value => ...,
    });

    $cgix->location_bounce($new_url_location);
    exit;
}

if (scalar keys %$form) {
     my $val_hash = $cgix->conf_read($pathtovalidation);
     my $err_obj = $cgix->validate($hash, $val_hash);
     if ($err_obj) {
         my $errors  = $err_obj->as_hash;
         my $input   = "Some content";
         my $content = "";
         $cgix->swap_template(\$input, $errors, $content);
         $cgix->fill({text => \$content, form => $hashref});
         print $content;
         exit;
     } else {
         print "Success";
     }
} else {
     print "Main page";
}

DESCRIPTION

CGI::Ex provides a suite of utilities to make writing CGI scripts more enjoyable. Although they can all be used separately, the main functionality of each of the modules is best represented in the CGI::Ex::App module. CGI::Ex::App takes CGI application building to the next step. CGI::Ex::App is not quite a framework (which normally includes pre-built html) instead CGI::Ex::App is an extended application flow that dramatically reduces CGI build time in most cases. It does so using as little magic as possible. See CGI::Ex::App.

The main functionality is provided by several other modules that may be used separately, or together through the CGI::Ex interface.

CGI::Ex METHODS

MODULES

See also CGI::Ex::App.

See also CGI::Ex::Auth.

See also CGI::Ex::Conf.

See also CGI::Ex::Die.

See also CGI::Ex::Dump.

See also CGI::Ex::Fill.

See also CGI::Ex::Template.

See also CGI::Ex::Validate.

LICENSE

This module may be distributed under the same terms as Perl itself.

AUTHOR

Paul Seamons <perl at seamons dot com>