Tux::Constants - Constant definitions for tux_perl
use Tux; use Tux::Constants qw/:event/; $r->event(TUX_EVENT_FINISH_REQ); use Tux::Constants qw/:method/; if($r->method==METHOD_POST){ ... } use Tux::Constants qw/:action/; $r->tux(TUX_ACTION_SEND_BUFFER);
Tux::Constants defines constants for tux_perl, including events, methods and actions.
Please refer to tux man page for the description of events.
Two actions are predefined to speed up the module: TUX_EVENT_FINISH_REQ and TUX_EVENT_FINISH_CLOSE_REQ. Setting the event value to these two values, tux_perl will do action TUX_ACTION_FINISH_REQ or TUX_ACTION_FINISH_CLOSE_REQ when this request is processed next time without enter the perl handler.
The http_method method of Tux object will return one of the following values: METHOD_NONE, METHOD_GET, METHOD_HEAD, METHOD_POST, or METHOD_PUT.
None by default.
TUX_ACTION_STARTUP TUX_ACTION_SHUTDOWN TUX_ACTION_STARTTHREAD TUX_ACTION_STOPTHREAD TUX_ACTION_EVENTLOOP TUX_ACTION_GET_OBJECT TUX_ACTION_SEND_OBJECT TUX_ACTION_READ_OBJECT TUX_ACTION_FINISH_REQ TUX_ACTION_FINISH_CLOSE_REQ TUX_ACTION_REGISTER_MODULE TUX_ACTION_UNREGISTER_MODULE TUX_ACTION_CURRENT_DATE TUX_ACTION_REGISTER_MIMETYPE TUX_ACTION_READ_HEADERS TUX_ACTION_POSTPONE_REQ TUX_ACTION_CONTINUE_REQ TUX_ACTION_REDIRECT_REQ TUX_ACTION_READ_POST_DATA TUX_ACTION_SEND_BUFFER TUX_ACTION_WATCH_PROXY_SOCKET TUX_ACTION_WAIT_PROXY_SOCKET
TUX_EVENT_FINISH_REQ TUX_EVENT_FINISH_CLOSE_REQ
METHOD_NONE METHOD_GET METHOD_HEAD METHOD_POST METHOD_PUT
Tux, tux
More information about tux_perl can be found at
http://tux-perl.sourceforge.net http://sourceforge.net/projects/tux-perl
Yale Huang, <yale@sdf-eu.org>
Copyright 2002 by Yale Huang
This library is released under the GPL; you can redistribute it and/or modify it under the term of GPL.
To install Tux, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tux
CPAN shell
perl -MCPAN -e shell install Tux
For more information on module installation, please visit the detailed CPAN module installation guide.