/usr/share/perl5/URI/IRI.pm is in liburi-perl 1.73-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | package URI::IRI;
# Experimental
use strict;
use warnings;
use URI ();
use overload '""' => sub { shift->as_string };
our $VERSION = '1.73';
$VERSION = eval $VERSION;
sub new {
my($class, $uri, $scheme) = @_;
utf8::upgrade($uri);
return bless {
uri => URI->new($uri, $scheme),
}, $class;
}
sub clone {
my $self = shift;
return bless {
uri => $self->{uri}->clone,
}, ref($self);
}
sub as_string {
my $self = shift;
return $self->{uri}->as_iri;
}
our $AUTOLOAD;
sub AUTOLOAD
{
my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::')+2);
# We create the function here so that it will not need to be
# autoloaded the next time.
no strict 'refs';
*$method = sub { shift->{uri}->$method(@_) };
goto &$method;
}
sub DESTROY {} # avoid AUTOLOADing it
1;
|