WWW::AdServer::Logger - strategy class for logging impressions / clickthrus


WWW-AdServer documentation Contained in the WWW-AdServer distribution.

Index


Code Index:

NAME

Top

WWW::AdServer::Logger - strategy class for logging impressions / clickthrus

SYNOPSIS

Top

  use WWW::AdServer::Logger::Foo;

  my $logger = WWW::AdServer::Logger::Foo->new( $r );

  $logger->log_impression($advert);

  $logger->log_clickthru($advert);

DESCRIPTION

Top

Declares an interface common to all Logger subclasses.

$logger = WWW::AdServer::Logger::Foo->new( $r );

Constructor for a Logger strategy. Must be supplied with either an Apache request object or an Apache::Emulator object (if called through CGI).

$logger->log_impression($advert);

Logs a view of an advert.

$logger->log_clickthru($advert);

Logs a clickthru on an advert.

EXPORT

None by default.

AUTHOR

Top

Nigel Wetters (nwetters@cpan.org)

COPYRIGHT

Top


WWW-AdServer documentation Contained in the WWW-AdServer distribution.

package WWW::AdServer::Logger;
$VERSION = '0.01';
use strict;
use vars qw ( $VERSION );
use Carp;

sub new
{
    my ($class, $r) = @_;
    croak ('Displayer strategies must be constructed with an Apache request object')
	unless (defined $r);
    my $self = bless \$r, $class;

    return $self;
}

sub log_impression
{
    croak ('class has not implimented log method');
}

sub log_clickthru
{
    croak ('class has not implimented log method');
}

1;
__END__