GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
POEx::Role::SessionInstantiation::Meta::Session::Implementation(3) User Contributed Perl Documentation POEx::Role::SessionInstantiation::Meta::Session::Implementation(3)

POEx::Role::SessionInstantiation::Meta::Session::Implementation - Provides actual POE::Session implementation

version 1.102610

    is: rw, isa: HashRef, default: {}, lazy: yes

In following the POE::Session API, sessions can take options that do various things related to tracing and debugging. By default, tracing => 1, will turn on tracing of POE event firing to your object. debug => 1, currently does nothing but more object level tracing maybe enabled in future versions.

    is: rw, isa: ArrayRef, default: [], lazy: yes

POE::Session's constructor provides a mechanism for passing arguments that will end up as arguments to the _start event handler. This is the exact same thing.

    is: rw, isa: Str, clearer: clear_alias, trigger: registers alias

This attribute controls your object's alias to POE. POE allows for more than one alias to be assigned to any given session, but this attribute only assumes a single alias and will not attempt to keep track of all the aliases. Last alias set will be what is returned. Calling the clearer will remove the last alias set from POE and unset it. You must be inside a valid POE context for the trigger to actually fire (ie, inside a event handler that has been invoked from POE). While this can be set at construction time, it won't be until _start that it will actually register with POE. If you override _start, don't forget to set this attribute again ( $self->alias($self->alias); ) or else your alias will never get registered with POE.

    is: ro, isa: Int

This attribute will return what your POE assigned Session ID is. Must only be accessed after your object has been fully built (ie. after any BUILD methods). This ID can be used, in addition to a reference to yourself, and your defined alias, by other Sessions for addressing events sent through POE to your object.

    is: rw, isa: Any, default: {}, lazy: yes

A traditional POE::Session provides a set aside storage space for the session context and that space is provided via argument to event handlers. With this Role, your object gains its own heap storage via this attribute.

    is: ro, isa: POEx::Role::SessionInstantiation::Meta::POEState

The poe attribute provides runtime context for your object methods. It contains an POEState object with it's own attributes and methods. Runtime context is built for each individual event handler invocation and then torn down to avoid context crosstalk. It is important to only access this attribute from within a POE invoked event handler. Please see POEx::Role::SessionInstantiation::Meta::POEState for information regarding its methods and attributes.

    (Kernel|Session|DoesSessionInstantiation $sender, Str $state, ArrayRef $etc, Maybe[Str] $file, Maybe[Int] $line, Maybe[Str] $from)

_invoke_state is the dispatch method called by POE::Kernel to deliver events. It will introspect via meta to find the $state given by the Kernel. If the method exists, but doesn't compose the POEx::Role::Event role, a warning will be issued, and the method /not/ executed. If the method doesn't exist, it will search for a method call '_default' (which also must be marked as an event). If it can't find that, it gives up with a warning.

Otherwise, it will build a POEState object, and then execute the method passing @$etc as arguments. In the case of '_default', $etc will be passed as is.

    (Str $method_name, Maybe[CodeRef|MooseX::Method::Signatures::Meta::Method] $coderef, Maybe[Str] $ignore)

_register_state is called by the Kernel anytime an event is added to a session via POE::Kernel's state() method. This can happen from an arbitrary source or from within the session itself via POE::Wheel instances.

POE::Wheels register plain old code refs that must be wrapped appropriately. Otherwise it expects fullblown methods that compose POEx::Role::Event.

    (CodeRef|MooseX::Method::Signatures::Meta::Method $ref)

_wheel_wrap_method is a private method that makes sure wheel states are called how they think they should be called. This allows proper interaction with the default POE Wheel implementations.

Nicholas Perez <nperez@cpan.org>

This software is copyright (c) 2010 by Nicholas Perez.

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

2010-09-18 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.