NAME

Haver::Wheel::Loader - description

SYNOPSIS

use Haver::Wheel::Loader;
use MyPlugin;

# ... In some POE state ...
my $loader = Haver::Wheel::Loader;
$loader->load_wheel('MyPlugin', 'some', 'args');
$_[HEAP]{loader} = $loader;

DESCRIPTION

This object maintains a list of wheel objects which have states loaded into a session.

FIXME: Write a better description.

METHODS

This class implements the following methods:

new()

This returns a new Haver::Wheel::Loader object.

load_wheel($class, @args)

Creates a new object of class $class, passing @args to its new() class method. The newly created object will have its load() method called, which should load states into the currently active POE::Session.

For details on defining wheels, see POE::Session::Plugin.

unload_wheel($class)

Call unload() on the object associated with $class, and then destroy the said object.

wheels()

Returns a list of the currently loaded class names.

fetch_wheel($class)

Returns the wheel object of type $class. Returns undef if $class was never loaded.

unload_all_wheels()

Unload all currently loaded wheels.

This is called when the wheel loader is DESTROY()'d, so you never really need to call it.

BUGS

None known. Bug reports are welcome. Please use our bug tracker at http://gna.org/bugs/?func=additem&group=haver.

AUTHOR

Dylan William Hardison, <dylan@haverdev.org>

SEE ALSO

http://www.haverdev.org/, POE, POE::Session, POE::NFA.

COPYRIGHT and LICENSE

Copyright (C) 2005 by Dylan William Hardison. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this module; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA