Author: dylan
Date: 2005-05-21 02:37:39 -0400 (Sat, 21 May 2005)
New Revision: 692
Modified:
trunk/
trunk/misc/poe-wheel-square/lib/POE/Wheel/Square.pm
trunk/misc/poe-wheel-square/lib/POE/Wheel/Square/Loader.pm
Log:
[EMAIL PROTECTED]: dylan | 2005-05-21 02:37:27 -0400
more renaming of the square wheel.
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/local/trunk:11166
1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/local/trunk-merge-10131:11178
27e50396-46e3-0310-8b22-ae223a1f35ce:/local:212
e9404bb1-7af0-0310-a7ff-e22194cd388b:/haver/local:974
edfcd8bd-4ce7-0310-a97e-bb1efd40edf3:/local:238
+ 1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/local/trunk:11166
1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/local/trunk-merge-10131:11178
27e50396-46e3-0310-8b22-ae223a1f35ce:/local:212
e9404bb1-7af0-0310-a7ff-e22194cd388b:/haver/local:975
edfcd8bd-4ce7-0310-a97e-bb1efd40edf3:/local:238
Modified: trunk/misc/poe-wheel-square/lib/POE/Wheel/Square/Loader.pm
===================================================================
--- trunk/misc/poe-wheel-square/lib/POE/Wheel/Square/Loader.pm 2005-05-21
06:37:37 UTC (rev 691)
+++ trunk/misc/poe-wheel-square/lib/POE/Wheel/Square/Loader.pm 2005-05-21
06:37:39 UTC (rev 692)
@@ -1,6 +1,6 @@
# vim: set ts=4 sw=4 noexpandtab si ai sta tw=100:
# This module is copyrighted, see end of file for details.
-package POE::Session::Plugin::Loader;
+package POE::Wheel::Square::Loader;
use strict;
use warnings;
use Carp;
@@ -10,44 +10,44 @@
sub new {
my $class = shift;
my $self = {
- plugins => {},
+ wheels => {},
};
bless $self, $class;
}
-sub load_plugin {
+sub load_wheel {
my ($self, $class, @args) = @_;
- if (exists $self->{plugins}{$class}) {
+ if (exists $self->{wheels}{$class}) {
croak "Plugin $class already loaded!";
}
my $object = $class->new(@args);
$object->load;
- $self->{plugins}{$class} = $object;
+ $self->{wheels}{$class} = $object;
}
-sub unload_plugin {
+sub unload_wheel {
my ($self, $class) = @_;
- my $object = delete $self->{plugins}{$class};
+ my $object = delete $self->{wheels}{$class};
$object->unload;
}
-sub plugins {
+sub wheels {
my $self = shift;
- keys %{ $self->{plugins} };
+ keys %{ $self->{wheels} };
}
-sub unload_all_plugins {
+sub unload_all_wheels {
my ($self) = @_;
- map { $self->unload($_) } $self->plugins
+ map { $self->unload($_) } $self->wheels
}
-sub fetch_plugin {
+sub fetch_wheel {
my ($self, $class) = @_;
- if (exists $self->{plugins}{$class}) {
- $self->{plugins}{$class};
+ if (exists $self->{wheels}{$class}) {
+ $self->{wheels}{$class};
} else {
undef;
}
@@ -58,21 +58,21 @@
__END__
=head1 NAME
-POE::Session::Plugin::Loader - description
+POE::Wheel::Square::Loader - description
=head1 SYNOPSIS
- use POE::Session::Plugin::Loader;
+ use POE::Wheel::Square::Loader;
use MyPlugin;
# ... In some POE state ...
- my $loader = POE::Session::Plugin::Loader;
- $loader->load_plugin('MyPlugin', 'some', 'args');
+ my $loader = POE::Wheel::Square::Loader;
+ $loader->load_wheel('MyPlugin', 'some', 'args');
$_[HEAP]{loader} = $loader;
=head1 DESCRIPTION
-This object maintains a list of plugin objects which have states loaded into a
session.
+This object maintains a list of wheel objects which have states loaded into a
session.
FIXME: Write a better description.
@@ -82,35 +82,35 @@
=head2 new(Z<>)
-This returns a new POE::Session::Plugin::Loader object.
+This returns a new POE::Wheel::Square::Loader object.
-=head2 load_plugin($class, @args)
+=head2 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 L<POE::Session>.
-For details on defining plugins, see L<POE::Session::Plugin>.
+For details on defining wheels, see L<POE::Session::Plugin>.
-=head2 unload_plugin($class)
+=head2 unload_wheel($class)
Call unload() on the object associated with $class,
and then destroy the said object.
-=head2 plugins(Z<>)
+=head2 wheels(Z<>)
Returns a list of the currently loaded class names.
-=head2 fetch_plugin($class)
+=head2 fetch_wheel($class)
-Returns the plugin object of type $class.
+Returns the wheel object of type $class.
Returns undef if $class was never loaded.
-=head2 unload_all_plugins(Z<>)
+=head2 unload_all_wheels(Z<>)
-Unload all currently loaded plugins.
+Unload all currently loaded wheels.
-This is called when the plugin loader is DESTROY()'d, so you never really need
to call it.
+This is called when the wheel loader is DESTROY()'d, so you never really need
to call it.
=head1 BUGS
Modified: trunk/misc/poe-wheel-square/lib/POE/Wheel/Square.pm
===================================================================
--- trunk/misc/poe-wheel-square/lib/POE/Wheel/Square.pm 2005-05-21 06:37:37 UTC
(rev 691)
+++ trunk/misc/poe-wheel-square/lib/POE/Wheel/Square.pm 2005-05-21 06:37:39 UTC
(rev 692)
@@ -1,6 +1,6 @@
# vim: set ts=4 sw=4 noexpandtab si ai sta tw=100:
# This module is copyrighted, see end of file for details.
-package POE::Session::Plugin;
+package POE::Wheel::Square;
use strict;
use warnings;
use Carp;
@@ -120,13 +120,13 @@
__END__
=head1 NAME
-POE::Session::Plugin - Base class for modules that extend POE::Session at
runtime.
+POE::Wheel::Square - Base class for modules that extend POE::Session at
runtime.
=head1 SYNOPSIS
package MyPlugin;
use POE;
- use base 'POE::Session::Plugin';
+ use base 'POE::Wheel::Square';
sub setup {
my $self = shift;
@@ -153,16 +153,20 @@
=head2 new(@args)
-This returns a new plugin object.
+This returns a new wheel object.
Its arguments (@args) are passed to setup()
-=head2 setup()
+=head2 setup(Z<>)
B<Do not call this method>. It is called by new().
Subclasses should overload this method and use it call provide()
to specify which states they define in the current session.
+=head2 ID(Z<>)
+
+This returns the unique wheel id of the square wheel.
+
=head2 define($state [, $method ])
Bind $state in the currently active session to the method $method of $self.
@@ -207,7 +211,7 @@
=head1 SEE ALSO
-L<http://www.haverdev.org/>, L<POE::Session::Plugin::Loader>,
+L<http://www.haverdev.org/>, L<POE::Wheel::Square::Loader>,
L<POE>, L<POE::Session>, L<POE::NFA>.
=head1 COPYRIGHT and LICENSE