File: socks.pm

package info (click to toggle)
liblwp-protocol-socks-perl 1.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 92 kB
  • sloc: perl: 140; makefile: 2
file content (35 lines) | stat: -r--r--r-- 628 bytes parent folder | download | duplicates (4)
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
##############################
package URI::socks;
require URI::http;
use URI::Escape;
#URI::implementor(socks => 'URI::http');
our @ISA = qw(URI::http);

# [RT 48172] Adding user/pass functionality
sub user {
    my $self = shift;

    my $userinfo = $self->userinfo();
    my($user) = split(/:/, $userinfo);
    uri_unescape($user);
}

sub pass {
    my $self = shift;

    my $userinfo = $self->userinfo();
    my(undef, $pass) = split(/:/, $userinfo);
    uri_unescape($pass);
}

1;

__END__

=head1 NAME

URI::Socks - support for socks://host:port

=head1 AUTHOR

Sheridan C Rawlins E<lt>F<sheridan.rawlins@yahoo.com>E<gt>