Gantry
view release on metacpan or search on metacpan
lib/Gantry.pm view on Meta::CPAN
$callback->( $self );
}
}
# set post_max - used for apache request object
$self->post_max( $self->fish_config( 'post_max' ) || '20000000' );
# set user varible
$self->user( $self->fish_user() );
# set default content-type
$self->content_type( $self->fish_config( 'content_type' ) || 'text/html' );
# set template variables
$self->template( $self->fish_config( 'template' ) );
$self->template_default( $self->fish_config( 'template_default' ) );
$self->template_wrapper( $self->fish_config( 'template_wrapper' ) );
$self->template_disable( $self->fish_config( 'template_disable' ) );
# set application directory variables
my $app_root = $self->fish_config( 'root' ) || '';
lib/Gantry.pm view on Meta::CPAN
$path_info = $self->path_info; $self->path_info( path_info );
Set/get for server path_info
=item content_type
$type = $self->content_type;
$self->content_type( 'text/html' );
Set/get for reponse content-type
=item content_length
$type = $self->content_length;
$self->content_length( $length );
Set/get for reponse content-length
=item root
lib/Gantry/Engine/MP13.pm view on Meta::CPAN
Returns the IP address for the remote user
=item $self->send_error_output
Returns the content of custom_error. It gives $@ to the custom_error method.
=item $self->send_http_header( $r )
Send the response line and all headers to the client. Takes an optional
parameter indicating the content-type of the response, i.e. 'text/html'.
This method will create headers from the $r->content_xxx() and $r->no_cache()
attributes (described below) and then append the headers defined by
$r->header_out (or $r->err_header_out if status indicates an error).
See mod_perl 1.0 docs.
=item $self->server_root
Returns the value set by the top-level ServerRoot directive
lib/Gantry/Plugins/PageCache.pm view on Meta::CPAN
}
}
# all other caching
elsif ( _caching_enabled( $gobj ) ) {
$cache_key = _make_gantry_cache_key( $gobj, { serialize => 1 } );
if ( my $page = $gobj->cache_get( $cache_key ) ) {
# set the content-type
$gobj->content_type(
$gobj->cache_get( $cache_key . "content_type" )
);
# set cached page
$gobj->gantry_response_page( $page );
}
# flag it for the cache store method
else {
$gobj->gantry_pagecache( $cache_key );
lib/Gantry/Plugins/PageCache.pm view on Meta::CPAN
# special CRUD caching
if ( $gobj->gantry_pagecache_crud() ) {
my $cache_key = $gobj->gantry_pagecache();
if ( $gobj->action() =~ /do_edit|do_add|do_delete/ ) {
# set page
$gobj->cache_set( $cache_key, $gobj->gantry_response_page() );
# set content-type
$gobj->cache_set(
( $cache_key . 'content_type' ),
$gobj->content_type()
);
}
}
# all other caching
elsif( _caching_enabled( $gobj ) ) {
my $cache_key = $gobj->gantry_pagecache();
# set page
$gobj->cache_set( $cache_key, $gobj->gantry_response_page() );
# set content-type
$gobj->cache_set(
( $cache_key . 'content_type' ),
$gobj->content_type()
);
}
}
#-----------------------------------------------------------
( run in 0.522 second using v1.01-cache-2.11-cpan-d7f47b0818f )