/usr/share/perl5/URI
# # Written by Ryan Kereliuk <ryker@ryker.org>. This file may be # distributed under the same terms as Perl itself. # # The RFC 3261 sip URI is <scheme>:<authority>;<params>?<query>. # package URI::sip; use strict; use warnings; use parent qw(URI::_server URI::_userpass); use URI::Escape (); our $VERSION = '5.09'; sub default_port { 5060 } sub authority { my $self = shift; $$self =~ m,^($URI::scheme_re:)?([^;?]*)(.*)$,os or die; my $old = $2; if (@_) { my $auth = shift; $$self = defined($1) ? $1 : ""; my $rest = $3; if (defined $auth) { $auth =~ s/([^$URI::uric])/ URI::Escape::escape_char($1)/ego; $$self .= "$auth"; } $$self .= $rest; } $old; } sub params_form { my $self = shift; $$self =~ m,^((?:$URI::scheme_re:)?)(?:([^;?]*))?(;[^?]*)?(.*)$,os or die; my $paramstr = $3; if (@_) { my @args = @_; $$self = $1 . $2; my $rest = $4; my @new; for (my $i=0; $i < @args; $i += 2) { push(@new, "$args[$i]=$args[$i+1]"); } $paramstr = join(";", @new); $$self .= ";" . $paramstr . $rest; } $paramstr =~ s/^;//o; return split(/[;=]/, $paramstr); } sub params { my $self = shift; $$self =~ m,^((?:$URI::scheme_re:)?)(?:([^;?]*))?(;[^?]*)?(.*)$,os or die; my $paramstr = $3; if (@_) { my $new = shift; $$self = $1 . $2; my $rest = $4; $$self .= $paramstr . $rest; } $paramstr =~ s/^;//o; return $paramstr; } # Inherited methods that make no sense for a SIP URI. sub path {} sub path_query {} sub path_segments {} sub abs { shift } sub rel { shift } sub query_keywords {} 1;
.
Edit
..
Edit
Escape.pm
Edit
Heuristic.pm
Edit
IRI.pm
Edit
QueryParam.pm
Edit
Split.pm
Edit
URL.pm
Edit
WithBase.pm
Edit
_foreign.pm
Edit
_generic.pm
Edit
_idna.pm
Edit
_ldap.pm
Edit
_login.pm
Edit
_punycode.pm
Edit
_query.pm
Edit
_segment.pm
Edit
_server.pm
Edit
_userpass.pm
Edit
data.pm
Edit
file
Edit
file.pm
Edit
ftp.pm
Edit
gopher.pm
Edit
http.pm
Edit
https.pm
Edit
ldap.pm
Edit
ldapi.pm
Edit
ldaps.pm
Edit
mailto.pm
Edit
mms.pm
Edit
news.pm
Edit
nntp.pm
Edit
nntps.pm
Edit
pop.pm
Edit
rlogin.pm
Edit
rsync.pm
Edit
rtsp.pm
Edit
rtspu.pm
Edit
sftp.pm
Edit
sip.pm
Edit
sips.pm
Edit
snews.pm
Edit
ssh.pm
Edit
telnet.pm
Edit
tn3270.pm
Edit
urn
Edit
urn.pm
Edit