ClearPress
view release on metacpan or search on metacpan
* Set $ClearPress::controller::EXPERIMENTAL_HEADERS = 1 to enable Apache2::RequestRec-based status response headers
libclearpress-perl (473.0.3) stable; urgency=low
* localization warnings disabled by default. Use $ClearPress::view::DEBUG_L10N = 1 to enable warnings about missing localization strings
libclearpress-perl (473.0.1) stable; urgency=low
* Added base64 filter: [% string | base64 %] - useful for inline image data
* Quietened down DBI DESTROY/disconnect warnings
* Added basic SVG response and content-type support
* JSON response content-type changed from application/javascript to application/json
libclearpress-perl (472.0.4) stable; urgency=low
* Downgraded Template version requirement to supported ubuntu-trusty package
libclearpress-perl (471.0.4) stable; urgency=low
* Forgot to add Lingua::EN::PluralToSingular prerequisite to Build.PL
libclearpress-perl (471.0.3) stable; urgency=low
lib/ClearPress/controller.pm view on Meta::CPAN
#########
# let the view have the decorator in case it wants to modify headers
#
$viewobject->decorator($decorator);
my $charset = $viewobject->charset();
$charset = ($charset && !exists $ENV{REDIRECT_STATUS}) ? qq[;charset=$charset] : q[];
my $content_type = sprintf q[%s%s], $viewobject->content_type(), $charset;
#########
# update the content-type/charset with whatever the view determined was right for the response
#
$headers->header('Content-Type', $content_type);
if($decor) {
# if($content_type =~ /text/smx && $charset =~ /utf-?8/smix) {
# binmode STDOUT, q[:encoding(UTF-8)]; # is this useful? If so, should it be less conditional?
# }
#########
# decorated header
lib/ClearPress/decorator.pm view on Meta::CPAN
=head2 meta_description - HTML meta description
=head2 meta_author - HTML meta author
=head2 meta_version - HTML meta version
=head2 meta_refresh - HTML meta refresh
=head2 meta_cookie - HTML meta cookie
=head2 meta_content_type - HTML meta content-type
=head2 meta_expires - HTML meta expires
=head2 onload - body onload value (javascript)
=head2 onunload - body onunload value (javascript)
=head2 onresize - body onresize value (javascript)
=head1 DEPENDENCIES
lib/ClearPress/view.pm view on Meta::CPAN
$self->output_buffer($self->headers->as_string, "\n");
$self->decorator->meta_refresh(qq[0;URL='$url']);
#########
# clean everything up and terminate
#
$self->output_flush();
$self->headers->clear();
########
# Warning: This ought to correspond to content-type, but doesn't!
#
return <<"EOT"
<p>This document has moved <a href="$url">here</a>.</p>
<script>document.location.href="$url";</script>
EOT
}
#########
# automated method generation for core CRUD+ view methods
#
( run in 0.669 second using v1.01-cache-2.11-cpan-524268b4103 )