CGI::Compile man page on Pidora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Pidora logo
[printable version]

CGI::Compile(3)	      User Contributed Perl Documentation      CGI::Compile(3)

NAME
       CGI::Compile - Compile .cgi scripts to a code reference like
       ModPerl::Registry

SYNOPSIS
	 use CGI::Compile;
	 my $sub = CGI::Compile->compile("/path/to/script.cgi");

DESCRIPTION
       CGI::Compile is an utility to compile CGI scripts into a code reference
       that can run many times on its own namespace, as long as the script is
       ready to run on a persistent environment.

       NOTE: for best results, load CGI::Compile before any modules used by
       your CGIs.

RUN ON PSGI
       Combined with CGI::Emulate::PSGI, your CGI script can be turned into a
       persistent PSGI application like:

	 use CGI::Emulate::PSGI;
	 use CGI::Compile;

	 my $cgi_script = "/path/to/foo.cgi";
	 my $sub = CGI::Compile->compile($cgi_script);
	 my $app = CGI::Emulate::PSGI->handler($sub);

	 # $app is a PSGI application

CAVEATS
       If your CGI script has a subroutine that references the lexical scope
       variable outside the subroutine, you'll see warnings such as:

	 Variable "$q" is not available at ...
	 Variable "$counter" will not stay shared at ...

       This is due to the way this module compiles the whole script into a big
       "sub". To solve this, you have to update your code to pass around the
       lexical variables, or replace "my" with "our". See also
       <http://perl.apache.org/docs/1.0/guide/porting.html#The_First_Mystery>
       for more details.

AUTHOR
       Tatsuhiko Miyagawa <miyagawa@bulknews.net>

CONTRIBUTORS
       Rafael Kitover <rkitover@cpan.org>

       Hans Dieter Pearcey <hdp@cpan.org>

COPYRIGHT & LICENSE
       Copyright (c) 2009 Tatsuhiko Miyagawa <miyagawa@bulknews.net>

       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

SEE ALSO
       ModPerl::RegistryCooker CGI::Emulate::PSGI

perl v5.14.1			  2011-05-24		       CGI::Compile(3)
[top]

List of man pages available for Pidora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net