Permalink
Browse files

Explain that request() is a convenience method to gloss over the deta…

…ils of $poe_kernel->post().
  • Loading branch information...
rcaputo committed Jan 25, 2011
1 parent f32ece5 commit 3bd9acb1e815ed4966afaa56baf932331e6b09ba
Showing with 9 additions and 0 deletions.
  1. +5 −0 eg/eg-11-poco-postback.pl
  2. +4 −0 eg/eg-12-poco-event.pl
@@ -27,6 +27,11 @@
# Send the component a Reflex::POE::Postback, which looks and
# feels like a POE::Session postback but invokes Reflex callbacks.
+ #
+ # The request() call here could be replaced with
+ # $poe_kernel->post(...) assuming you import $poe_kernel and
+ # understand how to address the component. PoCoPostback provides
+ # the request() method to gloss over these details.
$self->component->request(
Reflex::POE::Postback->new(
$self, "on_component_result", { cookie => 123 }
View
@@ -31,6 +31,10 @@
# which it will then use to respond back to this Reflex object.
$self->run_within_session(
sub {
+ # The request() call here could be replaced with
+ # $poe_kernel->post(...) assuming you import $poe_kernel and
+ # understand how to address the component. PoCoEvent provides
+ # the request() method to gloss over these details.
$self->component->request(
# Reflex::POE::Event looks and feels like a POE event, but
# it includes magic to route responses back to the correct

0 comments on commit 3bd9acb

Please sign in to comment.