Skip to content

Instantly share code, notes, and snippets.

@kentaro
Created July 23, 2010 09:00
Show Gist options
  • Save kentaro/487196 to your computer and use it in GitHub Desktop.
Save kentaro/487196 to your computer and use it in GitHub Desktop.
package Acme::LWP::RobotUA;
use strict;
use warnings;
use Carp qw(croak);
use base qw(LWP::RobotUA);
sub request {
my $self = shift;
my ($request) = @_;
croak "逮捕されちゃいますよ #librahack"
if $request->uri->host eq 'www.library.okazaki.aichi.jp';
$self->SUPER::request(@_);
}
!!1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment