Questions tagged [poe]

POE is a portable framework for cooperative, event driven multitasking and networking in Perl. Other languages have similar frameworks. Python has Twisted. TCL has "the event loop".

Related Resources

54 questions
2
votes
2 answers

How do I write tests against POE EasyDBI?

I'm looking for some ideas or techniques to write tests against code that uses an EasyDBI session for accessing data in mysql. I don't want the EasyDBI session to be aware of being tested, so I was hoping to find a way to mock a DSN or something…
dudeman
  • 503
  • 3
  • 11
2
votes
0 answers

Perl POE - How to properly yielding a timer

I'm trying to get along with POE in perl. Very slowly I'm starting to grasp its concept but I'm far from really understanding it: #!perl use warnings; use strict; use IO::Socket; use POE qw(Wheel::SocketFactory Wheel::ReadWrite); my $SERVER_ADDR…
Tom
  • 81
  • 11
2
votes
1 answer

Dancer : how to share data and waiting response between 2 POST without blocking

I have a rest server written in perl dancer on a VM, this is the workflow : customers POST some json stuff in /post_wait route : the POST should waiting the business processing to return the result the request is processed by another VMs…
Gilles Quénot
  • 173,512
  • 41
  • 224
  • 223
2
votes
1 answer

How to undersand the POE-Tk use of destroy?

Here is some test code to illustrate my problem; use Tk; use POE qw( Loop::TkActiveState ); use Tk::Toplevel; POE::Session->create( inline_states => { _start => \&ui_start ,top1 => \&top1 ,top2 =>…
jpolache
  • 305
  • 3
  • 12
1
vote
1 answer

Are multiple simultaneous Perl POE providers permitted?

I'm using POE to build a system that bridges several protocols (HTTP, IRC, XMPP), and I'd like to use POE to drive a single event loop that handles these protocols. Can I do this safely, and if so, how?
Jashank Jeremy
  • 360
  • 1
  • 4
  • 14
1
vote
2 answers

Raspberry Pi POE-FAN Hat with ubuntu

Hi im struggling with my POE-FAN Hats for my new raspberry pi 4. Installed several Pi's with the offical POE-HAT: https://www.raspberrypi.org/products/poe-hat/ POE works just fine, but the fans (on every raspberry) wont turn on. I saw a lot of…
tkan
  • 21
  • 3
1
vote
2 answers

Perl POE::Wheel::FollowTail running in a thread not modifying global variables

In this program POE::Wheel::FollowTail works well for following the tail of a file, it is also running in a separate thread to simply monitor the progress of a compile job. Inside the InputEvent handler there's a crude regex to extract compile…
0xDEADBEEF
  • 808
  • 1
  • 11
  • 19
1
vote
1 answer

Unexplained upgrade of a string to utf-8

I have a web server in Perl with POE. Before the data hits the wire, the header and body are concatenated in POE::Filter::HTTPD->put. For some bizare reason, some of the headers are being promoted to utf-8, which means binary body is getting…
Leolo
  • 1,327
  • 9
  • 14
1
vote
0 answers

perl POE::Component::Pool

The code below prints the result of the SQL query, but why won't it insert the record? #!/cbilldata/media/perl/bin/perl use Data::Dumper; use POE; use POE qw( Component::Pool::DBI ); my $user_name = "username"; POE::Session->create( …
yambu
  • 35
  • 6
1
vote
0 answers

What are (dis)advantages running POE (Perl object environment) under Windows?

I need to build a production critical system for networking using the POE module under Windows system. As I see from some source in the Internet that POE is not behaved well under Windows, could someone give feedback for bad or good about the usage…
JANM
  • 11
  • 1
1
vote
2 answers

POE complains that POE::Kernel's run method was never called when I fork

This is my code: if ($DAEMON) { my $pid = fork(); if (not defined $pid) { print "Unable to start daemon.\n"; exit(1); …
perlit
  • 329
  • 4
  • 13
1
vote
1 answer

How do I get the responses from POE::Component::Client::HTTP?

My component POE::Component::Client::HTTP->spawn( Agent => "MyScript/1.0", Alias => 'browser', Timeout => 60, FollowRedirects => 3, ); This is the event handler of another POE component from where the…
perlit
  • 329
  • 4
  • 13
1
vote
1 answer

User authentication using POE::Component::Client::HTTP

I am trying to find a module in perl poe which can do user authentication while making a HTTP request. HTTP request should be non-blocking or How should I use poe::component::client:http to do user authentication by providing username , password…
user3540276
  • 139
  • 3
  • 10
1
vote
1 answer

How do I send a raw IRC message when using Bot::BasicBot

Bot::BasicBot provides a method for fetching the handle of the underlying POE::Component::IRC::State object, pocoirc(). Using this object handle, it seems like it should be possible to send a raw message like this: sub said { my ($self, $message)…
1
vote
0 answers

Is my POE::Component::IRC Event loop stuck?

I've been tasked with writing an IRC bot which will join channels on the internal IRC system here, and post messages to channels which don't appear to be used anymore, warning any potential users that the channel is about to be retired. Our IRC…
GodEater
  • 3,445
  • 2
  • 27
  • 30