NAME

Simulation::DiscreteEvent::Server - Moose role for implementing servers

SYNOPSIS

package MyServer;
use Moose;
use parent 'Simulation::DiscreteEvent::Server';
sub handler1 : Event(start) {
    # handle start event here
}
sub handler2 : Event(stop) {
    # handle stop event here
}
no Moose;
__PACKAGE__->meta->make_immutable;

Description

This is a Moose role that used to implement servers for Simulation::DiscreteEvent models.

SUBROUTINES/METHODS

$self->name([$name])

Allows you to get/set the name of the server

$self->handle($event, @args)

Invokes handler for $event and passes @args as arguments.

AUTHOR

Pavel Shaydo, <zwon at cpan.org>

BUGS

Please report any bugs or feature requests to bug-simulation-discreteevent at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Simulation-DiscreteEvent. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Simulation::DiscreteEvent

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2010 Pavel Shaydo.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.