NAME

ClearPress::decorator - HTML site-wide header & footer handling

VERSION

$LastChangeRevision$

SYNOPSIS

DESCRIPTION

SUBROUTINES/METHODS

new

defaults - Accessor for default settings used in HTML headers

my $sValue = $oDecorator->defaults($sKey);

fields - All generic get/set accessors for this object

my @aFields = $oDecorator->fields();
$oDecorator->cookie(@aCookies);
my @aCookies = $oDecorator->cookie();

header - construction of HTTP and HTML site headers

http_header - construction of HTTP response headers

e.g. content-type, set-cookie etc.

my $sHTTPHeaders = $oDecorator->http_header();

site_header - construction of HTML site headers

i.e. <html>...<body>

Subclass and extend this method to provide consistent site-branding

my $sHTMLHeader = $oDecorator->site_header();

i.e. </body></html> by default

my $sHTMLFooter = $oDecorator->site_footer

username - get/set username of authenticated user

my $sUsername = $oDecorator->username();

cgi - get/set accessor for a CGI object

$oDecorator->cgi($oCGI);

my $oCGI = $oDecorator->cgi();

session - Placeholder for a session hashref

 my $hrSession = $oDecorator->session();

This will not do any session handling until subclassed and overridden for a specific environment/service.

save_session - Placeholder for session saving

This will not do any session handling until subclassed and overridden for a specific environment/service.

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

title - HTML page title

stylesheet - External CSS URL (arrayref permitted)

style - Embedded CSS content

jsfile - External Javascript URL (arrayref permitted)

script - Embedded Javascript content (arrayref permitted)

atom - External ATOM feed URL (arrayref permitted)

rss - External RSS feed URL (arrayref permitted)

meta_keywords - HTML meta keywords

meta_description - HTML meta description

meta_author - HTML meta author

meta_version - HTML meta version

meta_refresh - HTML meta refresh

meta_content_type - HTML meta content-type

meta_expires - HTML meta expires

onload - body onload value (javascript)

onunload - body onunload value (javascript)

onresize - body onresize value (javascript)

DEPENDENCIES

strict
warnings
CGI
base
Class::Accessor

INCOMPATIBILITIES

BUGS AND LIMITATIONS

AUTHOR

Roger Pettett, <rpettett@cpan.org>

LICENSE AND COPYRIGHT

Copyright (C) 2008 Roger Pettett

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.