On Thu, Aug 04, 2005 at 04:47:42PM -0700, Justin Tang wrote:
> Hi:
> I was wondering if there is any way I can add a dynamic parameter for the
> filter_content callback function to modify and keep track off for each
> server in the config file? I'm thinking something like:
>
> server1 = (
> base_url => '$resource',
> same_host => '$same_host',
> agent => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)',
> link_tags => [qw/ a frame /],
> credential_timeout => undef,
> use_cookies => 'true',
> use_head_requests => 'true',
> counter => 8,
> filter_content => sub{
my ( $uri, $server, $content_ref ) = @_;
my $counter = $server->{counter};
> $counter-- if($_[3] =~ /keyword/);
>
>
> $_[1]->{abort}++ if($counter == 0);
$server->{counter} = $counter;
> }
>
> )
>
>
> Is this possible? Thanks!
>
> -Justin
>
>
>
--
Bill Moseley
moseley@hank.org
Unsubscribe from or help with the swish-e list:
http://swish-e.org/Discussion/
Help with Swish-e:
http://swish-e.org/current/docs
swish-e@sunsite.berkeley.edu
Received on Sun Aug 7 07:48:25 2005