Next:
Yawns::Mailer
Previous:
Yawns::Formatters::Textile
 [Table of Contents]

Yawns::IP



NAME

Yawns::IP - A module for working with an IP blacklist.

SYNOPSIS

    #!/usr/bin/perl -w

    use Yawns::IP;
    use strict;

    #
    #  Test to see if the lookback address is blocked.
    #
    my $ip	= Yawns::IP->new();
    my $blocked	= $ip->lookup( '127.0.0.1' );

DESCRIPTION

This module will allow an IP address to be looked up in the site-wide comment-posting blacklist.

The blacklist is cached in memory to provide fast lookups.

We only use the blacklist to decide whether anonymous commentors may post - if a user is logged in then we don't lookup their IP address in the cache.

new

  Create a new instance of this object.

lookup

  Return the results of an IP address lookup, if the in-memory cache of
 IP addresses is not found then we query the database for all blacklisted
 IP addresses.

invalidateCache

  Clean our cached blacklist details.

AUTHOR

Steve Kemp

http://www.steve.org.uk/

LICENSE

Copyright (c) 2005,2006 by Steve Kemp. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license.


[Top] Generated by HTML::FromPod 0.49 on Fri Nov 21 03:03:57 2008