ubunut 里面怎么更换 linux 查看perl版本的版本

ubuntu zimbra_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
ubuntu zimbra
&&ubuntu zimbra 安装教程
阅读已结束,下载文档到电脑
想免费下载更多文档?
定制HR最喜欢的简历
下载文档到电脑,方便使用
还剩17页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢Module ngx_http_perl_module
Learn how to configure caching, load balancing, cloud deployments, and other critical NGINX features.englishModule ngx_http_perl_module
The ngx_http_perl_module module is used to implement
location and variable handlers in Perl and insert Perl calls into SSI.
This module is not built by default, it should be enabled with the
--with-http_perl_module
configuration parameter.
This module requires
version 5.6.1 or higher.
The C compiler should be compatible with the one used to build Perl.
Known Issues
The module is experimental, caveat emptor applies.
In order for Perl to recompile the modified modules during
reconfiguration, it should be built with the
-Dusemultiplicity=yes or
-Dusethreads=yes parameters.
Also, to make Perl leak less memory at run time,
it should be built with the
-Dusemymalloc=no parameter.
To check the values of these parameters in an already built
Perl (preferred values are specified in the example), run:
$ perl -V:usemultiplicity -V:usemymalloc
usemultiplicity='define';
usemymalloc='n';
Note that after rebuilding Perl with the new
-Dusemultiplicity=yes or
-Dusethreads=yes parameters,
all binary Perl modules will have to be rebuilt as well —
they will just stop working with the new Perl.
There is a possibility that the main process and then worker processes will
grow in size after every reconfiguration.
If the main process grows to an unacceptable size, the
procedure can be applied without changing the executable file.
While the Perl module is performing a long-running operation, such as
resolving a domain name, connecting to another server, or querying a database,
other requests assigned to the current worker process will not be processed.
It is thus recommended to perform only such operations
that have predictable and short execution time, such as
accessing the local file system.
Example Configuration
perl_modules perl/
perl_require hello.
perl_set $msie6 '
my $ua = $r-&header_in("User-Agent");
return "" if $ua =~ /Opera/;
return "1" if $ua =~ / MSIE [6-9]\.\d+/;
return "";
location / {
perl hello::
The perl/lib/hello.pm module:
sub handler {
$r-&send_http_header("text/html");
return OK if $r-&header_
$r-&print("hello!\n&br/&");
if (-f $r-&filename or -d _) {
$r-&print($r-&uri, " exists!\n");
return OK;
Directives
perl module::function|'sub { ... }';
location, limit_except
Sets a Perl handler for the given location.
perl_modules path;
Sets an additional path for Perl modules.
perl_require module;
Defines the name of a module that will be loaded during each
reconfiguration.
Several perl_require directives can be present.
module::function|'sub { ... }';
Installs a Perl handler for the specified variable.
Calling Perl from SSI
An SSI command calling Perl has the following format:
&!--# perl sub="module::function" arg="parameter1" arg="parameter2" ...
The $r Request Object Methods
returns request arguments.
$r-&filename
returns a filename corresponding to the request URI.
$r-&has_request_body(handler)
returns 0 if there is no body in a request.
If there is a body, the specified handler is set for the request
and 1 is returned.
After reading the request body, nginx will call the specified handler.
Note that the handler function should be passed by reference.
sub handler {
if ($r-&request_method ne "POST") {
return DECLINED;
if ($r-&has_request_body(\&post)) {
return OK;
return HTTP_BAD_REQUEST;
sub post {
$r-&send_http_
$r-&print("request_body: \"", $r-&request_body, "\"&br/&");
$r-&print("request_body_file: \"", $r-&request_body_file, "\"&br/&\n");
return OK;
$r-&allow_ranges
enables the use of byte ranges when sending responses.
$r-&discard_request_body
instructs nginx to discard the request body.
$r-&header_in(field)
returns the value of the specified client request header field.
$r-&header_only
determines whether the whole response or only its header should be sent to
the client.
$r-&header_out(field,
sets a value for the specified response header field.
$r-&internal_redirect(uri)
does an internal redirect to the specified uri.
An actual redirect happens after the Perl handler execution is completed.
Redirections to named locations are currently not supported.
$r-&log_error(errno,
writes the specified message into the
If errno is non-zero, an error code and its description
will be appended to the message.
$r-&print(text, ...)
passes data to a client.
$r-&request_body
returns the client request body if it has not been
written to a temporary file.
To ensure that the client request body is in memory,
its size should be limited by
and a sufficient buffer size should be set using
$r-&request_body_file
returns the name of the file with the client request body.
After the processing, the file should be removed.
To always write a request body to a file,
should be enabled.
$r-&request_method
returns the client request HTTP method.
$r-&remote_addr
returns the client IP address.
immediately sends data to the client.
$r-&sendfile(name[,
sends the specified file content to the client.
Optional parameters
specify the initial offset and length of the data to be transmitted.
The actual data transmission happens after the Perl handler
has completed.
$r-&send_http_header([type])
sends the response header to the client.
The optional type parameter sets the value of
the “Content-Type” response header field.
If the value is an empty string, the “Content-Type”
header field will not be sent.
$r-&status(code)
sets a response code.
$r-&sleep(milliseconds,
sets the specified handler
and stops request processing for the specified time.
In the meantime, nginx continues to process other requests.
After the specified time has elapsed, nginx will call the installed handler.
Note that the handler function should be passed by reference.
In order to pass data between handlers,
$r-&variable() should be used.
sub handler {
$r-&discard_request_
$r-&variable("var", "OK");
$r-&sleep(1000, \&next);
return OK;
sub next {
$r-&send_http_
$r-&print($r-&variable("var"));
return OK;
$r-&unescape(text)
decodes a text encoded in the “%XX” form.
returns a request URI.
$r-&variable(name[,
returns or sets the value of the specified variable.
Variables are local to each request.2012年1月 其他开发语言大版内专家分月排行榜第二2011年5月 其他开发语言大版内专家分月排行榜第二2010年12月 其他开发语言大版内专家分月排行榜第二2009年2月 其他开发语言大版内专家分月排行榜第二2008年9月 其他开发语言大版内专家分月排行榜第二2008年8月 其他开发语言大版内专家分月排行榜第二2008年5月 其他开发语言大版内专家分月排行榜第二2007年11月 其他开发语言大版内专家分月排行榜第二
2011年4月 其他开发语言大版内专家分月排行榜第三2011年1月 其他开发语言大版内专家分月排行榜第三2009年6月 其他开发语言大版内专家分月排行榜第三2009年4月 其他开发语言大版内专家分月排行榜第三2009年1月 其他开发语言大版内专家分月排行榜第三2008年11月 其他开发语言大版内专家分月排行榜第三2008年7月 其他开发语言大版内专家分月排行榜第三2008年6月 其他开发语言大版内专家分月排行榜第三2006年9月 其他开发语言大版内专家分月排行榜第三
2010年5月 其他开发语言大版内专家分月排行榜第三2009年7月 其他开发语言大版内专家分月排行榜第三2005年3月 其他开发语言大版内专家分月排行榜第三
2010年5月 其他开发语言大版内专家分月排行榜第三2009年7月 其他开发语言大版内专家分月排行榜第三2005年3月 其他开发语言大版内专家分月排行榜第三
2010年5月 其他开发语言大版内专家分月排行榜第三2009年7月 其他开发语言大版内专家分月排行榜第三2005年3月 其他开发语言大版内专家分月排行榜第三
2010年5月 其他开发语言大版内专家分月排行榜第三2009年7月 其他开发语言大版内专家分月排行榜第三2005年3月 其他开发语言大版内专家分月排行榜第三
2010年5月 其他开发语言大版内专家分月排行榜第三2009年7月 其他开发语言大版内专家分月排行榜第三2005年3月 其他开发语言大版内专家分月排行榜第三
2010年5月 其他开发语言大版内专家分月排行榜第三2009年7月 其他开发语言大版内专家分月排行榜第三2005年3月 其他开发语言大版内专家分月排行榜第三
本帖子已过去太久远了,不再提供回复功能。在Ubuntu 12.04 中用户如何更换一个更快的软件源?
阅读 8,575 次
ubuntu 12.04 已经发布一段时间了,相对ubuntu 11.10, ubuntu12.04多少有一些改变,此教材以图示的方式给大家介绍如何更换一个更快的软件源地址。
启动器中打开ubuntu软件中心
鼠标顶部面板点击编辑选择软件源
选择其他站点
选择最佳服务器
系统自动测试最快的源
系统选择了一个最快的源
输入系统密码使用此源
更换完毕关闭窗口
新跟进评论
我评论的新回复
| 得票最多

我要回帖

更多关于 perl版本升级 的文章

 

随机推荐