X7ROOT File Manager
Current Path:
/usr/share/perl5/URI
usr
/
share
/
perl5
/
URI
/
ðŸ“
..
📄
Escape.pm
(6.9 KB)
📄
Heuristic.pm
(6.37 KB)
📄
IRI.pm
(820 B)
📄
QueryParam.pm
(4.77 KB)
📄
Split.pm
(2.32 KB)
📄
URL.pm
(5.36 KB)
📄
WithBase.pm
(3.77 KB)
📄
_foreign.pm
(133 B)
📄
_generic.pm
(5.71 KB)
📄
_idna.pm
(2.06 KB)
📄
_ldap.pm
(3.2 KB)
📄
_login.pm
(257 B)
📄
_punycode.pm
(5.52 KB)
📄
_query.pm
(2.5 KB)
📄
_segment.pm
(442 B)
📄
_server.pm
(3.66 KB)
📄
_userpass.pm
(1.04 KB)
📄
data.pm
(3.34 KB)
ðŸ“
file
📄
file.pm
(9.53 KB)
📄
ftp.pm
(1.06 KB)
📄
gopher.pm
(2.4 KB)
📄
http.pm
(451 B)
📄
https.pm
(170 B)
📄
ldap.pm
(2.88 KB)
📄
ldapi.pm
(467 B)
📄
ldaps.pm
(170 B)
📄
mailto.pm
(1.27 KB)
📄
mms.pm
(151 B)
📄
news.pm
(1.45 KB)
📄
nntp.pm
(153 B)
📄
pop.pm
(1.2 KB)
📄
rlogin.pm
(155 B)
📄
rsync.pm
(233 B)
📄
rtsp.pm
(151 B)
📄
rtspu.pm
(152 B)
📄
sftp.pm
(124 B)
📄
sip.pm
(1.69 KB)
📄
sips.pm
(169 B)
📄
snews.pm
(198 B)
📄
ssh.pm
(201 B)
📄
telnet.pm
(154 B)
📄
tn3270.pm
(154 B)
ðŸ“
urn
📄
urn.pm
(2.15 KB)
Editing: Split.pm
package URI::Split; use strict; use warnings; our $VERSION = '1.73'; $VERSION = eval $VERSION; use Exporter 5.57 'import'; our @EXPORT_OK = qw(uri_split uri_join); use URI::Escape (); sub uri_split { return $_[0] =~ m,(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?,; } sub uri_join { my($scheme, $auth, $path, $query, $frag) = @_; my $uri = defined($scheme) ? "$scheme:" : ""; $path = "" unless defined $path; if (defined $auth) { $auth =~ s,([/?\#]), URI::Escape::escape_char($1),eg; $uri .= "//$auth"; $path = "/$path" if length($path) && $path !~ m,^/,; } elsif ($path =~ m,^//,) { $uri .= "//"; # XXX force empty auth } unless (length $uri) { $path =~ s,(:), URI::Escape::escape_char($1),e while $path =~ m,^[^:/?\#]+:,; } $path =~ s,([?\#]), URI::Escape::escape_char($1),eg; $uri .= $path; if (defined $query) { $query =~ s,(\#), URI::Escape::escape_char($1),eg; $uri .= "?$query"; } $uri .= "#$frag" if defined $frag; $uri; } 1; __END__ =head1 NAME URI::Split - Parse and compose URI strings =head1 SYNOPSIS use URI::Split qw(uri_split uri_join); ($scheme, $auth, $path, $query, $frag) = uri_split($uri); $uri = uri_join($scheme, $auth, $path, $query, $frag); =head1 DESCRIPTION Provides functions to parse and compose URI strings. The following functions are provided: =over =item ($scheme, $auth, $path, $query, $frag) = uri_split($uri) Breaks up a URI string into its component parts. An C<undef> value is returned for those parts that are not present. The $path part is always present (but can be the empty string) and is thus never returned as C<undef>. No sensible value is returned if this function is called in a scalar context. =item $uri = uri_join($scheme, $auth, $path, $query, $frag) Puts together a URI string from its parts. Missing parts are signaled by passing C<undef> for the corresponding argument. Minimal escaping is applied to parts that contain reserved chars that would confuse a parser. For instance, any occurrence of '?' or '#' in $path is always escaped, as it would otherwise be parsed back as a query or fragment. =back =head1 SEE ALSO L<URI>, L<URI::Escape> =head1 COPYRIGHT Copyright 2003, Gisle Aas This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut
Upload File
Create Folder