The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

LWPx::ParanoidHandler - Handler for LWP::UserAgent that protects you from harm

SYNOPSIS

    use LWPx::ParanoidHandler;
    use LWP::UserAgent;

    my $ua = LWP::UserAgent->new();
    make_paranoid($ua);

    my $res = $ua->request(GET 'http://127.0.0.1/');
    # my $res = $ua->request(GET 'http://google.com/');
    use Data::Dumper; warn Dumper($res);
    warn $res->status_line;

DESCRIPTION

LWPx::ParanoidHandler is clever firewall for LWP::UserAgent. This module provides a handler to protect a request to internal servers.

It's useful to implement OAuth servers, crawlers, etc.

FUNCTIONS

make_paranoid($ua[, $dns]);

Make your LWP::UserAgent instance to paranoid.

The $dns argument is instance of Net::DNS::Paranoid. It's optional.

AUTHOR

Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>

SEE ALSO

LWPx::ParanoidAgent have same feature as this module. But it's not currently maintain, and it's too hacky. LWPx::ParanoidHandler uses handler protocol provided by LWP::UserAgent, it's more safety.

This module uses a lot of code taken from LWPx::ParanoidAgent, thanks.

LICENSE

Copyright (C) Tokuhiro Matsuno

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.