Anansi-Script-CGI
view release on metacpan or search on metacpan
lib/Anansi/Script/CGI.pm view on Meta::CPAN
package Anansi::Script::CGI;
=head1 NAME
Anansi::Script::CGI - Defines the mechanisms specific to handling web browser execution.
=head1 SYNOPSIS
my $OBJECT = Anansi::Script::CGI->new();
=head1 DESCRIPTION
This module is designed to be an optional component module for use by the
L<Anansi::Script> component management module. It defines the processes
specific to handling both input and output from Perl scripts that are executed
by a web server using the Common Gateway Interface. Uses
L<Anansi::ComponentManager> I<(indirectly)>, L<Anansi::ScriptComponent> and
L<base>.
=cut
our $VERSION = '0.04';
use base qw(Anansi::ScriptComponent);
use CGI;
=head1 INHERITED METHODS
=cut
=head2 addChannel
Declared in L<Anansi::Component>.
=cut
=head2 channel
Declared in L<Anansi::Component>.
=cut
=head2 componentManagers
Declared in L<Anansi::Component>.
=cut
=head2 finalise
$OBJECT->SUPER::finalise();
Declared in L<Anansi::Class>. Overridden by this module.
=cut
sub finalise {
my ($self, %parameters) = @_;
$self->saveHeaders(%parameters);
print $self->content();
$self->used('CGI');
}
=head2 implicate
Declared in L<Anansi::Class>. Intended to be overridden by an extending module.
=cut
=head2 import
Declared in L<Anansi::Class>.
=cut
=head2 initialise
$OBJECT->SUPER::initialise();
Declared in L<Anansi::initialise>. Overridden by this module.
=cut
sub initialise {
my ($self, %parameters) = @_;
my $CGI = CGI->new();
$self->uses(
CGI => $CGI,
);
$self->loadHeaders(%parameters);
$self->loadParameters(%parameters);
$self->header('content-type' => 'text/html');
$self->content();
}
=head2 old
Declared in L<Anansi::Class>.
=cut
=head2 removeChannel
Declared in L<Anansi::Component>.
=cut
=head2 used
Declared in L<Anansi::Class>.
=cut
=head2 uses
Declared in L<Anansi::Class>.
=cut
=head1 METHODS
=cut
=head2 content
my $contents = $OBJECT->content();
my $contents = $OBJECT->channel('CONTENT');
if(1 == $OBJECT->content(undef, undef));
( run in 0.538 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )