The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

POEx::WorkerPool::Role::WorkerPool::Worker::GutsLoader - Implementation role of the Guts loader

VERSION

version 1.101610

PUBLIC_ATTRIBUTES

job_classes

 is: ro, isa: ArrayRef[ClassName], required: 1

These are the job classes should be loaded during init using Class::MOP::load_class

init

 is: ro, isa: CodeRef, lazy_build: 1

This holds the coderef that will be executed first to do any intitialization prior to building the Guts session

preamble

 is: ro, isa: CodeRef, lazy_build: 1

This holds the coderef that is responsible for stopping the forked POE::Kernel singleton

main

 is: ro, isa: CodeRef, lazy_build: 1

This holds the coderef that builds the actual Guts

prologue

 is: ro, isa: CodeRef, lazy_build: 1

This holds the coderef that calls run() on POE::Kernel to kickstart everything

loader

 is: ro, isa: CodeRef, lazy_build: 1

loader has the coderef that is used when building the POE::Wheel::Run instance inside of Worker's child_wheel attribute. The coderef is actually an aggregate of init, preamble, main, and prologue.

PROTECTED_METHODS

_build_init

_build_init builds the coderef used for initialization of the job classes in the child process.

_build_preamble

_build_preamble builds the coderef that calls stop on POE::Kernel by default.

_build_main

_build_main builds the coderef that instantiates the Guts instance without any arguments. If Guts has other roles applied at compile time that require extra arguments, this method will need to be advised to provide those arguments to the constructor.

_build_prologue

_build_prologue builds the coderef that calls run() on POE::Kernel by default.

_build_loader

_build_loader builds the coderef that is passed to the POE::Wheel::Run constructor inside of Worker's child_wheel attribute builder. It creates a closure around lexical references to init, preamble, main, and prologue, that executes said coderefs in that order.

AUTHOR

  Nicholas R. Perez <nperez@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Infinity Interactive.

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