NAME

OpenInteract2::Controller::ManageBoxes - Mixin methods for managing boxes

SYNOPSIS

use base qw( OpenInteract2::Controller::ManageBoxes );

DESCRIPTION

If a controller wants to keep track of boxes it should add this class to its ISA.

METHODS

init_boxes()

Initializes the internal variable for tracking boxes. Should be called from the implementing class's init() method.

add_box( [ \%box | $box_action ] )

Adds a box. This can be with a hashref of information \%box or you can create an action based on a box and add it.

Returns: information added

get_box( $name )

Return the box action or information with name $name. Since each name must be unique you will get at most one box.

If no $name specified, returns nothing

get_boxes()

Returns an arrayref of all boxes added during this request. They're not in any predictable order.

remove_box( $name )

Removes the box associated with $name.

If no $name specified, throws an exception. Otherwise returns the information previously in $name.

SEE ALSO

OpenInteract2::Controller

COPYRIGHT

Copyright (c) 2002-2004 Chris Winters. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHORS

Chris Winters <chris@cwinters.com>