Gantry::Stash::Controller - Stash object for the controller


Gantry documentation Contained in the Gantry distribution.

Index


Code Index:

NAME

Top

Gantry::Stash::Controller - Stash object for the controller

SYNOPSIS

Top

    $self->stash->controller->data( {} );

DESCRIPTION

Top

Controller data is an alternative to things like pnotes for data you want to track during a single requiest.

METHODS

Top

data

SEE ALSO

Top

Gantry(3), Gantry::Stash(3)

LIMITATIONS

Top

AUTHOR

Top

Phil Crow <pcrow@sunflowerbroadband.com> Tim Keefer <tkeefer@gmail.com>

COPYRIGHT and LICENSE

Top


Gantry documentation Contained in the Gantry distribution.

package Gantry::Stash::Controller;
package controller;

#-------------------------------------------------
# AUTOLOAD
#-------------------------------------------------
sub AUTOLOAD {
    my $self    = shift;
    my $command = our $AUTOLOAD;
    $command    =~ s/.*://;

    die( "Undefined stash->controller method $command" );

} # end AUTOLOAD

#-------------------------------------------------
# DESTROY
#-------------------------------------------------
sub DESTROY { }

#-------------------------------------------------
# new 
#-------------------------------------------------
sub new {
    my $class   = shift;
    my $self    = bless( {}, $class );
    return $self;

} # end new

#-------------------------------------------------
# data( value )
#-------------------------------------------------
sub data {
    my( $self, $p ) = ( shift, shift );

    $self->{__DATA__} = $p if defined $p;
    return( $self->{__DATA__} );

} # end data

1;

__END__