Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ils of $poe_kernel->post().
  • Loading branch information...
commit 3bd9acb1e815ed4966afaa56baf932331e6b09ba 1 parent f32ece5
@rcaputo authored
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
View
5 eg/eg-11-poco-postback.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
4 eg/eg-12-poco-event.pl
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.