http.pm
来自「1. 记录每个帖子的访问人情况」· PM 代码 · 共 36 行
PM
36 行
package URI::http;require URI::_server;@ISA=qw(URI::_server);use strict;use vars qw(%unreserved_escape);sub default_port { 80 }sub canonical{ my $self = shift; my $other = $self->SUPER::canonical; my $slash_path = defined($other->authority) && !length($other->path) && !defined($other->query); if ($slash_path || $$other =~ /%/) { $other = $other->clone if $other == $self; unless (%unreserved_escape) { for ("A" .. "Z", "a" .. "z", "0" .."9", "-", "_", ".", "!", "~", "*", "'", "(", ")" ) { $unreserved_escape{sprintf "%%%02X", ord($_)} = $_; } } $$other =~ s/(%[0-9A-F]{2})/exists $unreserved_escape{$1} ? $unreserved_escape{$1} : $1/ge; $other->path("/") if $slash_path; } $other;}1;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?