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
7
votes
1 answer

Writing a modular aggregator and normalizer in Perl

I've just entered into an environment where I am much more free to choose whatever approach I want for a project (meaning full access to the CPAN and no module-approval-by-committee), but I'm a little out of touch with the new hotnesses, so I…
Flowchartsman
  • 371
  • 2
  • 13
6
votes
2 answers

Where can I read a clear explanation of POE (Perl Object Environment)?

I am searching for about a week for a good and clear tutorial for POE that is relevant to 2010 and didn't find one. I found some tutorials in the Stack Overflow question Where can I find books or tutorials for Perl’s POE? under the poe tag but most…
Joe
  • 989
  • 2
  • 8
  • 5
6
votes
5 answers

What's the right way to kill child processes in perl before exiting?

I'm running an IRC Bot (Bot::BasicBot) which has two child processes running File::Tail but when exiting, they don't terminate. So I'm killling them using Proc::ProcessTable like this before exiting: my $parent=$$; my…
rarbox
  • 486
  • 5
  • 14
4
votes
2 answers

Is there a Perl POE module for monitoring a database table for changes?

Is there any Wheel /POCO /Option to do this in Perl using the POE module: I want to monitor a DB table for changed records (deleting /insert/ update) and react accordingly to those changes. If yes could one provide some code or a link that shows…
dan
  • 885
  • 2
  • 9
  • 18
3
votes
1 answer

POe Decentralise App - Use of eundeclared type or module sp/std

I trying to compile the new pallet. I run the command: cargo run -- --dev --tmp And I get this error in my terminal: error[E0433]: failed to resolve: use of undeclared type or module `sp_std` --> pallets/template/src/lib.rs:7:5 | 7 | use…
Mal
  • 51
  • 4
3
votes
3 answers

How to properly shut down POE and POE::Session?

With POE calling POE::Kernel->stop() results in immediately shutdown. How does one request a graceful shutdown, waiting for the yield, post, call FIFO to be empty before shutting down?
lnrdo
  • 396
  • 1
  • 13
3
votes
1 answer

Is it possible to get POE::Component::IRC to receive events for its own PRIVMSGs?

I'm currently developing a bot with POE::Component::IRC whose job, amongst other things, is to post a notice to a list of channels on a schedule, for one week. I can't seem to find a way to check that the message has been successfully sent to a…
GodEater
  • 3,445
  • 2
  • 27
  • 30
3
votes
2 answers

How do I correctly shutdown a Bot::BasicBot bot (based on POE::Component::IRC)?

This is a sample script. When I hit Ctrl+C, the bot quits IRC but it reconnects back after some time. How do I shut down the bot correctly? #!/usr/bin/perl package main; my $bot = Perlbot->new (server => 'irc.dal.net'); $SIG{'INT'} =…
rarbox
  • 486
  • 5
  • 14
3
votes
1 answer

How do I put an array on the POE heap and push or pop data?

How do I put an array on the POE heap, and push/pop data to/from it? I'm trying to put the following array on the heap: @commands = ( ["quit",\&Harlie::Commands::do_quit,10], ["part",\&Harlie::Commands::do_part,10], …
2
votes
5 answers

What can I do to find out what's causing my program to consume lots of memory over time?

I have an application using POE which has about 10 sessions doing various tasks. Over time, the app starts consuming more and more RAM and this usage doesn't go down even though the app is idle 80% of the time. My only solution at present is to…
perlit
  • 329
  • 4
  • 13
2
votes
0 answers

Perl POE: Alarm/Delay queueing

This is my first attempt at the Perl Object Environment (POE). I am attempting to create a program that will run as a service that obtains a list of devices via couchdb, spawns child processes to ping them in 60 second intervals, while restricting…
Mose
  • 541
  • 1
  • 11
  • 27
2
votes
1 answer

monitoring an exe application launching

I need to monitor an console exe application which don't have any stdin from the user it only print some info to the screen i used a POE:Wheel for this task Below are my code: use POE qw( Wheel::Run); POE::Session->create( inline_states…
dina
  • 21
  • 1
2
votes
2 answers

POE::Kernel->run() takes around 15 seconds to stop/

This is my code, have redacted the "use" statements. They all are working as desired. my $json_data; sub request { my ( $method, $container, $params, $content_type) = @_; #get the complete URL, works fine my $full_url = get_url(…
2
votes
1 answer

How can I identify Windows PnP events with Perl's POE?

Is there a POE module that identifies PnP events in Windows? If yes, could someone provide idea code snippet?
dan
  • 885
  • 2
  • 9
  • 18
2
votes
4 answers

How do I find the current value of a processes STDOUT in Perl?

I have a POE Perl program forking children. The children it is forking do logging and interactive telnets into remote devices. POE uses STDOUT to return output back up to the parent process but for some reason it's getting lost (not going to screen…
SimonT
  • 31
  • 4
1
2 3 4