Pavel Shaydo > Simulation-DiscreteEvent-0.09 > Simulation::DiscreteEvent::Server

Download:
Simulation-DiscreteEvent-0.09.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.09   Source  

NAME ^

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

SYNOPSIS ^

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

DESCRIPTION ^

This is a base class for implementing servers for Simulation::DiscreteEvent models. Please see description and examples of using this module in Simulation::DiscreteEvent::Cookbook.

METHODS ^

$self->name([$name])

Allows you to get/set the name of the server

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

Invoke handler for $event and pass to it @args as arguments.

AUTHOR ^

Pavel Shaydo, <zwon at cpan.org>

SUPPORT ^

Please see documentation for Simulation::DiscreteEvent

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.

syntax highlighting: