##################################################
my $ua = LWP::UserAgent->new;
+my @purge_hosts = exists $ENV{PURGE_HOSTS} ? split ' ', $ENV{PURGE_HOSTS} : ();
sub safe_can_nodie {
my ($type, $sub, $name) = @_;
}
sub purge {
- return unless $ENV{PURGE_HOST};
- my $req = HTTP::Request->new(PURGE => "http://$ENV{PURGE_HOST}$_[0]");
- $ua->request($req)
+ for my $host (@purge_hosts) {
+ my $req = HTTP::Request->new(PURGE => "http://$host$_[0]");
+ $ua->request($req)
+ }
}
sub process{