CGI-SpeedyCGI

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    Command Line
        The speedy command line is the same as for regular perl, with the
        exception that SpeedyCGI specific options can be passed in after a
        "--".

        For example the line:

                #!/usr/bin/speedy -w -- -t300

        at the top of your script will set the perl option "`-w'" and will
        pass the "`-t'" option to SpeedyCGI, setting the Timeout value to
        300 seconds.

    Environment
        Environment variables can be used to pass in options. This can only
        be done before the initial execution, not from within the script
        itself. The name of the environment variable is always SPEEDY_
        followed by the option name in upper-case. For example to set the
        speedy Timeout option, use the environment variable named
        SPEEDY_TIMEOUT.

    Module
        The CGI::SpeedyCGI module provides the setopt method to set options
        from within the perl script at runtime. There is also a getopt
        method to retrieve the current options. See the section on "METHODS"
        below.

    Apache
        If you are using the optional Apache module, SpeedyCGI options can
        be set in the httpd.conf file. The name of the apache directive will
        always be Speedy followed by the option name. For example to set the
        Timeout option, use the apache directive SpeedyTimeout.

  Context

    Not all options below are available in all contexts. The context for
    which each option is valid is listed on the "Context" line in the
    section below. There are three contexts:

    speedy
        The command-line "speedy" program, used normally with #! at the top
        of your script or from a shell prompt.

README  view on Meta::CPAN


    PerlArgs
            Command Line    : N/A
            Default Value   : ""
            Context         : mod_speedycgi

            Description:

                Command-line options to pass to the perl interpreter.

    Timeout
            Command Line    : -t<number>
            Default Value   : 3600 (one hour)
            Context         : mod_speedycgi, module, speedy

            Description:

                If no new requests have been received after <number>
                seconds, exit the persistent perl interpreter.  Zero
                indicates no timeout.

README  view on Meta::CPAN

        closed. Multiple functions can be added by calling the method more
        than once. At the end of the request, each function will be called
        in the order in which it was registered.

            $sp->register_cleanup(\&cleanup_func);

    add_shutdown_handler($function_ref)
        Add a function to the list of functions that will be called right
        before the perl interpreter exits. This is not at the end of each
        request, it is when the perl interpreter decides to exit completely
        due to a Timeout or reaching MaxRuns.

            $sp->add_shutdown_handler(sub {$dbh->logout});

    set_shutdown_handler($function_ref)
        Deprecated. Similar to `add_shutdown_handler', but only allows for a
        single function to be registered.

            $sp->set_shutdown_handler(sub {$dbh->logout});

    i_am_speedy

README.html  view on Meta::CPAN

The speedy command line is the same as for regular perl, with the exception
that SpeedyCGI specific options can be passed in after a ``--''.

<P>
For example the line:

<P>
<PRE>        #!/usr/bin/speedy -w -- -t300
</PRE>
<P>
at the top of your script will set the perl option ``<CODE>-w</CODE>'' and will pass the ``<CODE>-t</CODE>'' option to SpeedyCGI, setting the Timeout value to 300 seconds.

</DL>
<DL>
<DT><STRONG><A NAME="item_Environment">Environment</A></STRONG><DD>
<P>
Environment variables can be used to pass in options. This can only be done
before the initial execution, not from within the script itself. The name
of the environment variable is always SPEEDY_ followed by the option name
in upper-case. For example to set the speedy Timeout option, use the
environment variable named SPEEDY_TIMEOUT.

</DL>
<DL>
<DT><STRONG><A NAME="item_Module">Module</A></STRONG><DD>
<P>
The CGI::SpeedyCGI module provides the setopt method to set options from
within the perl script at runtime. There is also a getopt method to
retrieve the current options. See <A HREF="#METHODS">METHODS</A> below.

</DL>
<DL>
<DT><STRONG><A NAME="item_Apache">Apache</A></STRONG><DD>
<P>
If you are using the optional Apache module, SpeedyCGI options can be set
in the <EM>httpd.conf</EM> file. The name of the apache directive will always be Speedy followed by
the option name. For example to set the Timeout option, use the apache
directive SpeedyTimeout.

</DL>
<P>
<HR>
<H2><A NAME="Context">Context</A></H2>
<P>
Not all options below are available in all contexts. The context for which
each option is valid is listed on the ``Context'' line in the section
below. There are three contexts:

README.html  view on Meta::CPAN

<PRE>    Command Line    : N/A
    Default Value   : &quot;&quot;
    Context         : mod_speedycgi
</PRE>
<P>
<PRE>    Description:
</PRE>
<P>
<PRE>        Command-line options to pass to the perl interpreter.
</PRE>
<DT><STRONG><A NAME="item_Timeout">Timeout</A></STRONG><DD>
<P>
<PRE>    Command Line    : -t&lt;number&gt;
    Default Value   : 3600 (one hour)
    Context         : mod_speedycgi, module, speedy
</PRE>
<P>
<PRE>    Description:
</PRE>
<P>
<PRE>        If no new requests have been received after &lt;number&gt;

README.html  view on Meta::CPAN

the end of the request, each function will be called in the order in which
it was registered.

<P>
<PRE>    $sp-&gt;register_cleanup(\&amp;cleanup_func);
</PRE>
<DT><STRONG><A NAME="item_add_shutdown_handler">add_shutdown_handler($function_ref)</A></STRONG><DD>
<P>
Add a function to the list of functions that will be called right before
the perl interpreter exits. This is <STRONG>not</STRONG> at the end of each request, it is when the perl interpreter decides to exit
completely due to a Timeout or reaching MaxRuns.

<P>
<PRE>    $sp-&gt;add_shutdown_handler(sub {$dbh-&gt;logout});
</PRE>
<DT><STRONG><A NAME="item_set_shutdown_handler">set_shutdown_handler($function_ref)</A></STRONG><DD>
<P>
Deprecated. Similar to <A HREF="#item_add_shutdown_handler">add_shutdown_handler</A>, but only allows for a single function to be registered.

<P>
<PRE>    $sp-&gt;set_shutdown_handler(sub {$dbh-&gt;logout});

lib/CGI/SpeedyCGI.pm  view on Meta::CPAN


The speedy command line is the same as for regular perl, with the
exception that SpeedyCGI specific options can be passed in after a "--".

For example the line:

	#!/usr/bin/speedy -w -- -t300

at the top of your script will set the perl option
"C<-w>" and will pass the "C<-t>" option to SpeedyCGI, setting the
Timeout value to 300 seconds.

=back

=over

=item Environment

Environment variables can be used to pass in options.  This can only be
done before the initial execution, not from within the script itself.
The name of the environment variable is always SPEEDY_ followed by the
option name in upper-case.  For example to set the speedy Timeout option, use
the environment variable named SPEEDY_TIMEOUT.

=back

=over

=item Module

The CGI::SpeedyCGI module provides the setopt method to set options from
within the perl script at runtime.  There is also a getopt method to retrieve

lib/CGI/SpeedyCGI.pm  view on Meta::CPAN


=back

=over

=item Apache

If you are using the optional Apache module, SpeedyCGI options can be
set in the F<httpd.conf> file.  The name of the apache directive will always
be Speedy followed by the option name.  For example to set the
Timeout option, use the apache directive SpeedyTimeout.

=back

=head2 Context

Not all options below are available in all contexts.  The context for
which each option is valid is listed on the "Context" line in the section
below.  There are three contexts:

=over

lib/CGI/SpeedyCGI.pm  view on Meta::CPAN

=item PerlArgs

    Command Line    : N/A
    Default Value   : ""
    Context         : mod_speedycgi

    Description:

	Command-line options to pass to the perl interpreter.

=item Timeout

    Command Line    : -t<number>
    Default Value   : 3600 (one hour)
    Context         : mod_speedycgi, module, speedy

    Description:

	If no new requests have been received after <number>
	seconds, exit the persistent perl interpreter.	Zero
	indicates no timeout.

lib/CGI/SpeedyCGI.pm  view on Meta::CPAN

At the end of the request, each function will be called in the order
in which it was registered.

    $sp->register_cleanup(\&cleanup_func);

=item add_shutdown_handler($function_ref)

Add a function to the list of functions that will be called right before
the perl interpreter exits.  This is B<not> at the end of each request,
it is when the perl interpreter decides to exit completely due to a
Timeout or reaching MaxRuns.

    $sp->add_shutdown_handler(sub {$dbh->logout});

=item set_shutdown_handler($function_ref)

Deprecated.  Similar to C<add_shutdown_handler>, but only allows for a single
function to be registered.

    $sp->set_shutdown_handler(sub {$dbh->logout});

src/SpeedyCGI.src  view on Meta::CPAN


The speedy command line is the same as for regular perl, with the
exception that SpeedyCGI specific options can be passed in after a "--".

For example the line:

	#!/usr/bin/speedy -w -- -t300

at the top of your script will set the perl option
"C<-w>" and will pass the "C<-t>" option to SpeedyCGI, setting the
Timeout value to 300 seconds.

=back

=over

=item Environment

Environment variables can be used to pass in options.  This can only be
done before the initial execution, not from within the script itself.
The name of the environment variable is always SPEEDY_ followed by the
option name in upper-case.  For example to set the speedy Timeout option, use
the environment variable named SPEEDY_TIMEOUT.

=back

=over

=item Module

The CGI::SpeedyCGI module provides the setopt method to set options from
within the perl script at runtime.  There is also a getopt method to retrieve

src/SpeedyCGI.src  view on Meta::CPAN


=back

=over

=item Apache

If you are using the optional Apache module, SpeedyCGI options can be
set in the F<httpd.conf> file.  The name of the apache directive will always
be Speedy followed by the option name.  For example to set the
Timeout option, use the apache directive SpeedyTimeout.

=back

=head2 Context

Not all options below are available in all contexts.  The context for
which each option is valid is listed on the "Context" line in the section
below.  There are three contexts:

=over

src/SpeedyCGI.src  view on Meta::CPAN

At the end of the request, each function will be called in the order
in which it was registered.

    $sp->register_cleanup(\&cleanup_func);

=item add_shutdown_handler($function_ref)

Add a function to the list of functions that will be called right before
the perl interpreter exits.  This is B<not> at the end of each request,
it is when the perl interpreter decides to exit completely due to a
Timeout or reaching MaxRuns.

    $sp->add_shutdown_handler(sub {$dbh->logout});

=item set_shutdown_handler($function_ref)

Deprecated.  Similar to C<add_shutdown_handler>, but only allows for a single
function to be registered.

    $sp->set_shutdown_handler(sub {$dbh->logout});

src/optdefs  view on Meta::CPAN

# Context:
#    speedy		command-line
#    mod_speedycgi	apache module
#    module		CGI::SpeedyCGI module
#    all		all of the above
#    frontend		speedy and mod_speedycgi
#
#    If no context specified, then not available externally.
#

option	Timeout
type	whole
letter	t
defval	3600
defdesc	one hour
context	all
desc	If no new requests have been received after <number> seconds,
desc	exit the persistent perl interpreter.  Zero indicates no timeout.

option	MaxRuns
type	whole

src/optdefs  view on Meta::CPAN

desc	data to the perl backend.

option	BufsizGet
type	natural
letter	B
context	speedy
defval	131072
desc	Use <number> bytes as the maximum size for the buffer that receives
desc	data from the perl backend.

option  BECheckTimeout
type	natural
defval	1
desc	The frontend waits <number> seconds before waking up and checking for
desc	dead backends.

option	RestatTimeout
type	natural
defval	5
desc	The frontend re-stats the perl-script this often while waiting for
desc	a backend.  Also used as a timeout for re-opening the temp-file.

option	BESpawns
type	natural
defval	1
desc	The frontend can spawn this many backends simultaneously when there
desc	are frontends waiting for backends.  More may not be better.



( run in 0.801 second using v1.01-cache-2.11-cpan-4d50c553e7e )