| WWW-AdServer documentation | Contained in the WWW-AdServer distribution. |
WWW::AdServer::Displayer - strategy class for displaying adverts
use WWW::AdServer::Displayer::Foo; my $displayer = WWW::AdServer::Displayer::Foo->new( r=>$r ); $displayer->display($advert);
Declares an interface common to all Displayer subclasses.
Constructor for a Displayer strategy. Must be supplied with either an Apache request object, or an Apache::Emulator object (when using CGI).
Outputs the advert to the client.
None by default.
Nigel Wetters (nwetters@cpan.org)
Copyright (c) 2001, Nigel Wetters. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
| WWW-AdServer documentation | Contained in the WWW-AdServer distribution. |
package WWW::AdServer::Displayer; $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 display { croak ('class has not implimented display method'); } sub redirect { croak ('class has not implimented redirect method'); } 1; __END__