Re: wierdness with events

2002-12-25 Thread Rocco Caputo
ent => \&coderef ); # defines/overwrites "event" $kernel->state( event => undef ); # undefines "event" $kernel->state( "event" );# undefines "event" > Also is there a callback to use for trapping undef'd events? See C

Re: keeping POE from dying

2002-12-31 Thread Rocco Caputo
These days the preferred way to handle signals is to call POE::Kernel's sig_handled() method. sub handle_die { $_[KERNEL]->sig_handled(); } -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: ->call turns undef into ''

2002-12-31 Thread Rocco Caputo
o keep that behavior: It wasn't documented, and none of POE's tests failed without it. The un-undef "feature" has been removed and committed to CVS. People who suspect it may be a problem should test it and report issues before POE's next release. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: PATCH: POE::Wheel::Run: uses get_one, adds pause/resume, and set_filter

2002-12-31 Thread Rocco Caputo
or patching the documentation. It's true that this code is very similar to POE::Wheel::ReadWrite's. It might be good to abstract out their commonality and have both inherit from that. Please tread lightly in the new code. It's not yet tested directly. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: PoCo::Client::FTP status ?

2003-01-02 Thread Rocco Caputo
ks It looks like the web/e-mail host where PoCo::Client::FTP lives expired on 28 Dec. I'm trying to hunt down an alternate way of reaching him to let him know. I don't know of an alternate site for the project. Did he upload it to CPAN? If so, it will be mirrored on dozens of sites. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Wheel::Run anyone.. was: Dropping a connection

2003-01-02 Thread Rocco Caputo
gt; >Init > >runsomething <-- now owned by init (pid 1). > > If I kill the Init server then runsomething goes away.. very strange. Killing the Init server causes all the child processes have their STDIN and STDOUT suddenly go away. I don&

Re: session locking [x-adr]

2003-01-02 Thread Rocco Caputo
gt;a<-"? And if you don't beat me > to it, would you accept a patch that resulted in "->a<-"? That is, if I > _can_ figure out how to make it work? I would, but only as part of a long, drawn-out deprecation of the current yield() semantics. We would also need a tidy replacement function for yield(), for the people who like its enqueue-only behavior. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: session locking [x-adr]

2003-01-02 Thread Rocco Caputo
On Thu, Jan 02, 2003 at 02:42:52PM -0600, Garrett Goebel wrote: > From: Rocco Caputo [mailto:[EMAIL PROTECTED]] > > On Thu, Dec 12, 2002 at 05:52:17PM -0600, Garrett Goebel wrote: > > > > > > Shouldn't ->yield not just enqueue an event, but also do a &g

Re: why delete $param{name}

2003-01-06 Thread Rocco Caputo
On Mon, Jan 06, 2003 at 07:12:35AM -0800, Randal L. Schwartz wrote: > > Caveat executor, though. delete is no longer promised to return the > deleted item(s), as it was in the "old days". It just happens to work > for now. NNN!!! Ok, foo. --

Re: Non-blocking SSH in POE?

2003-01-06 Thread Rocco Caputo
em to Wheel::ReadWrite. That may be all you need to clear things up. > Any suggestions? Are there any other solutions I've overlooked here? -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Non-blocking SSH in POE?

2003-01-09 Thread Rocco Caputo
ion. Has anyone ever tried this before? > POE::Session::Pool just seems to be the obvious evolutionary step for me. POE::Component::JobQueue manages a worker pool, too. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Component::Server::HTTP errors

2003-01-10 Thread Rocco Caputo
n 2 accept: ERRORS The accept() will fail if: ... [ECONNABORTED] A connection arrived, but it was closed while waiting on the listen queue. That is, select() unblocked for accepting, but the client hung up before accept() was called. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Making POE stable

2003-01-10 Thread Rocco Caputo
or reporting in the main program. The type of program you're working on gives you a better environment for beating on and improving Wheel::Run. I'd appreciate any patches or advice you can provide on it. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Win32 PPD for ActivePerl 5.6?

2003-01-14 Thread Rocco Caputo
lled), > so I wish to use PPD for 5.6 if I can. Attached is an untested PPD or 5.6.1 and 5.8. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/ POE A portable networking/multitasking framework for Perl. Rocco Cap

Re: $kernel->delay()

2003-01-20 Thread Rocco Caputo
t; unregister => "all" ); } That way the bot has a chance to quit gracefully, rather than send the quit and then suddenly disconnect because the program has shut down. If your bot is still alive after that, it may be because of pending timers (other than the cleanup timer), aliases, other open files, open DCC connections, or something else. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: $kernel->delay()

2003-01-21 Thread Rocco Caputo
On Tue, Jan 21, 2003 at 12:12:04AM -0600, Werlax wrote: > > "Rocco Caputo" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > You should do the cleanup in two stages. > > > > sub cleanup { > > $_[KER

Re: POE::Kernel->run() does not return

2003-01-25 Thread Rocco Caputo
$play_args->[0] ], > StderrEvent => 'nullevent', > ); But in content_ended() you remove $_[HEAP]->{run}. That's not where the Wheel::Run instance is, so it never destructs, and the content handler doesn't go away. > delete $heap->{'run'

Re: installation problems

2003-01-26 Thread Rocco Caputo
ge which may fix your problem. Please try again? If it continues to not work, please include more information why. The more you can say about it, the quicker I'll be able to figure things out. Thanks! -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: again

2003-01-26 Thread Rocco Caputo
problem you describe sounds very unlikely unless Perl itself is having problems. If the test emits any warnings or error messages, please include them in your bug report. I don't have a suitable environment to reproduce your problem, so the more information you can provide, the faster a solut

Re: still installation problems

2003-01-27 Thread Rocco Caputo
ather ambiguous. Did you try visiting that URL in a web browser? Are you behind a firewall? If so, is PPM configured properly for it? -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: PoCo::JobQueue, postback

2003-01-30 Thread Rocco Caputo
ite still works. All tests passed... which leads me to believe that the tests aren't all that great. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: RedHat 8.0 and POE not terminating cleanly

2003-02-04 Thread Rocco Caputo
.1 that's served me well in the past. I suspect it's a problem in POE, but I won't know more 'til I track it down. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: RedHat 8.0 and POE not terminating cleanly

2003-02-05 Thread Rocco Caputo
.org/?Where_to_Get_POE Thanks for reporting the problem, and thank you for the test case. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: $kernel->delay()

2003-02-05 Thread Rocco Caputo
On Tue, Jan 21, 2003 at 02:18:12PM -0600, Werlax wrote: > > "Rocco Caputo" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > It comes from POE::Component::IRC. From the perldoc: > > > >irc_disconnec

ANNOUNCEMENT: POE 0.25 is released

2003-02-07 Thread Rocco Caputo
irror. It is also on the web, with an improved ActiveState PPD and tarball. - http://poe.perl.org/?Where_to_Get_POE Thanks again for making this release possible. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: POE::Wheel::Run ErrorEvent

2003-02-10 Thread Rocco Caputo
s expected. Most operating systems report read error 0 to signify the end of a file. 2. I am surprised that ErrorEvent is not triggered in that case. Are you using POE 0.25? If there is a problem in Wheel::Run, it would help greatly if you could submit a test case that reproduces it. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: RFC: Persistent Object Client/Server Scheme

2003-02-10 Thread Rocco Caputo
s > for CPAN? Unfortunately I cannot say. It seems that the concept overlaps remote persistent objects and remote method calls. Which is it more like? -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: POE::Wheel::Run ErrorEvent

2003-02-11 Thread Rocco Caputo
5 = 'STDOUT'; error: $VAR1 = 'read'; $VAR2 = '0'; $VAR3 = ''; $VAR4 = 2; $VAR5 = 'STDERR'; closed 2) eyrie:~/public_html/tmp% perl robt-casey-errorevent.perl Output: Died at -e line 1. error: $VAR1 = 'read'; $VAR2 = '0'; $VAR3 = ''; $VAR4 = 2; $VAR5 = 'STDERR'; error: $VAR1 = 'read'; $VAR2 = '0'; $VAR3 = ''; $VAR4 = 2; $VAR5 = 'STDOUT'; closed -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: POE::Wheel::Run ErrorEvent

2003-02-14 Thread Rocco Caputo
D to wheel reference here. Useful for managing multiple # child processes in the same session. $heap->{wheels}{$wheel->PID} = $wheel; } # ARG1 contains the PID of the ended child process. # ARG2 contains the $? (perlvar) associated with this CHLD signal. sub sig_chld_handler { my ($pid, $return_value) = @_[ARG1, ARG2]; my $wheel = delete $_[HEAP]->{wheels}{$pid}; if (defined $wheel) { print "Process $pid returned $return_value.\n"; } } -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Perl IRC bot on ipv6 network ?

2003-02-17 Thread Rocco Caputo
support the AF_INET6 socket domain, but I have heard of people successfully modifying the component to do it. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Q: Need recipe for a generic wizard application

2003-02-17 Thread Rocco Caputo
ike POE::NFA could do with some > patches ;) Those patches are of course welcome. :) -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Can't get response code from POE::Component::Client::HTTP in streaming mode

2003-02-23 Thread Rocco Caputo
urces/docs to find any > workaround but I've not found anything. Am I missing something? I think you're right. HTTP::Headers doesn't include the status code. Client::HTTP needs to do something else, but I'm not sure what. Suggestions are welcome. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Can't get response code from POE::Component::Client::HTTP in streaming mode

2003-02-27 Thread Rocco Caputo
On Tue, Feb 25, 2003 at 12:49:54AM +0300, Ilya Martynov wrote: > >>>>> On Sun, 23 Feb 2003 23:29:49 +0300, Ilya Martynov <[EMAIL PROTECTED]> said: > > >>>>> On Sun, 23 Feb 2003 12:27:37 -0500, Rocco Caputo <[EMAIL PROTECTED]> said: > RC>

Re: POE::Wheel::Run ErrorEvent

2003-02-27 Thread Rocco Caputo
On Mon, Feb 17, 2003 at 07:02:41PM -0500, Wiggins d'Anconia wrote: > > Rocco Caputo wrote: > >On Wed, Feb 12, 2003 at 08:38:25AM +1100, [EMAIL PROTECTED] wrote: > > > > > > >It's a valid interpretation of ErrorEvent, but it's not the way &g

Re: Feedback on POE::Wheel::Run changes

2003-03-05 Thread Rocco Caputo
feedback welcomed. POE::Wheel::Run is already very UNportable. We can probably work around missing get(gr|pw)nam functions, or at least throw "unsupported" errors wherever they fail. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Limit for # of POE::Session's?

2003-03-07 Thread Rocco Caputo
a real fork bomb because it doesn't call fork(). Instead it spawns sessions that spawn other sessions. To see how far you can go, increase $max_sessions or remove the checks for it entirely. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Doing Something Wrong?

2003-03-14 Thread Rocco Caputo
happen before run_job() has an opportunity to do anything. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: POE::Wheel::Run resource leak?

2003-03-24 Thread Rocco Caputo
variables used in closures after > closures were done executing. > > Good luck, it can take you a while to find all the leaks, but it can be > done. The patch in ticket 1783 has been applied to CVS, and it will appear in version 0.26 (no release date set). Thanks, and apologies for t

Re: Module submission POE::Component::Win32::Daemon

2003-03-28 Thread Rocco Caputo
/Autrijus/ Agreed here. POE::Component:: is a wide, open space in need of structure. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: POE::Wheel::Run resource leak?

2003-03-28 Thread Rocco Caputo
ng in the bits of code you posted. Is it possible for you to post a small yet complete and runnable test case that exhibits the problem? Thank you. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: POE::Wheel::Run resource leak?

2003-03-28 Thread Rocco Caputo
On Fri, Mar 28, 2003 at 09:03:54PM +0100, Sebastian Freund wrote: > Hi! > > Rocco Caputo wrote: > > I can't see anything obviously wrong in the bits of code you posted. > > Is it possible for you to post a small yet complete and runnable test > > case that ex

Re: Doing Something Wrong?

2003-03-28 Thread Rocco Caputo
ache you get when you're first learning POE is your brain expanding and pushing against your skull. Depending how quickly you can pick up new concepts, you may need to wrap your head in something to provide extra structure, or it may explode. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/ - [Grinning.]

Re: POE cygwin install issues

2003-04-02 Thread Rocco Caputo
time to time. That said, Cygwin probably supports more POE features because it's closer to a UNIX environment. Certainly that the tests only gave you two problems says something nice about Cygwin. The tests are riddled with MSWin32 checks (but not as many Cygwin checks) to disable several features. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: POE cygwin install issues

2003-04-04 Thread Rocco Caputo
On Thu, Apr 03, 2003 at 09:35:07PM -0600, Alan Hastings wrote: > > Looks like cygwin supports test 22 but not test 21... the fix is probably > more like this: [...] Done and committed. Thanks! -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: POE "Powered by" logo

2003-06-05 Thread Rocco Caputo
the size > of the button, so I created my own :) I like it (ymmv ;p), so I thought > I'd share. > > http://www.pipsqueek.net/images/powered-by/poe.png > > see it in use at http://www.pipsqueek.net/ Thanks, Shaun! I've added it (linked to it, actually) from http

Re: halfway secure server/client user authentification?

2003-06-05 Thread Rocco Caputo
s a test case that shows it working in client and server modes. http://poe.perl.org/poedown/sslpoe.tar.gz You didn't find it on the web because I just put it there. Previously it was hiding on my workstation. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: file event in perl-Tk on cygwin (using POE)

2003-06-07 Thread Rocco Caputo
d have been CORE::fileno($h) but you tried that. Has anyone reported success, failure, or patches to comp.lang.perl.tk? > 4. Any suggestions for where to look to try to fix it? comp.lang.perl.tk, and google for whatever mailing lists it may have been mentioned on. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Problems with Tk on win32

2003-05-31 Thread Rocco Caputo
State's Tk fixed, we should find someone with the proper compiler to rebuild it and the willingness to look at the problem. This has been a thorn in my side for over a year. I'm willing to work on this bug, but I don't have the right compiler to rebuild ActivePerl and/or ActiveState's version of Tk. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Problems with Tk on win32

2003-06-01 Thread Rocco Caputo
ds with IPC::Run. That still leaves a lot of functionality behind. See the "Win32 LIMITATIONS" section of perldoc IPC::Run for a very thorough explanation. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Session problems

2003-06-07 Thread Rocco Caputo
;hello !!\n"; sleep(20); } } We can get away with this because it's running in a completely different process. Your session is not kept alive because POE::Wheel::Run finishes with the child process. It should work better with an updated keep_idle_sess(). -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: POE events in Apache

2003-06-07 Thread Rocco Caputo
On Thu, May 22, 2003 at 03:19:24PM -0500, Luke A. Kanies wrote: > On Thu, 22 May 2003, Sam Vilain wrote: > > > On Thu, 22 May 2003 17:15, Rocco Caputo wrote: > > > If I understand, IKC::ClientLite is a small client library specifically > > > for programs that do

Re: Problems with Tk on win32

2003-06-08 Thread Rocco Caputo
OE select loop. [...] I suppose there's another option. Write a POE::Loop::TkWin32 or something that polls for I/O every 1/5 or 1/10 second using non-blocking select instead of Tk's fileevent callbacks. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: POE events in Apache

2003-06-09 Thread Rocco Caputo
On Mon, Jun 09, 2003 at 11:42:51PM +1200, Sam Vilain wrote: > On Sun, 08 Jun 2003 10:47, Rocco Caputo wrote: > > Nice standard, if seemingly baroque. Is it possible to write a > > POE::Filter::FastCGI? If so, you could probably use it just about > > everywhere POE::Filter::L

ANNOUNCE: ActiveState Tk support

2003-06-09 Thread Rocco Caputo
and let us know whether it works. For example, POE::Component::IRC should magically be working now. Your advanced use will help us deliver a more robust 0.27 release. Thanks! -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: creating new events without catching through POE::Component::Client::TCP?

2003-06-13 Thread Rocco Caputo
havoc somewhere > by blocking the return of that event processing or doesn't it matter?? You should use POE::Wheel::ReadLine or Term::Visual. Both work without blocking your program. Term::Visual is especially nice. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: creating new events without catching through POE::Component::Client::TCP?

2003-06-13 Thread Rocco Caputo
On Fri, Jun 13, 2003 at 06:40:07PM +0200, Bruno Boettcher wrote: > On Fri, Jun 13, 2003 at 11:22:44AM -0400, Rocco Caputo wrote: > > If messages are being sent but not received, you can easily find them > > by setting POE::Kernel::ASSERT_EVENTS, like so: > > > > sub

Re: creating new events without catching through POE::Component::Client::TCP?

2003-06-14 Thread Rocco Caputo
e, running the program with ktrace or strace might give a clue. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: definitely a POE::Wheel::ReadLine understanding problem....

2003-06-14 Thread Rocco Caputo
erence between our systems. POE::Wheel::ReadLine needs to be updated to handle that difference. Which OS are you using? Which version of Perl? Are you using the most recent version of POE? -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: new to POE

2003-06-23 Thread Rocco Caputo
on that platform. If someone with more Win32-fu can get this working, I'll be happy to make it officially supported in 0.27. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: new to POE

2003-06-29 Thread Rocco Caputo
g under Cygwin, possibly because of DLL conflicts with identically named ones from ActiveState Perl on the same system. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Questions on Readwrite/FollowTail on Win32

2003-07-04 Thread Rocco Caputo
does not support select() on plain files. That's why POE::Wheel::ReadWrite doesn't work. The proper way to resolve this would be to create a POE::Loop::Win32 (perhaps POE::Loop::ActivePerl if Cygwin Perl does not have this problem). With the Win32-isms firmly supported at the low level, all the higher-level wheels and components will suddenly work. [code] -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Revision 1.65 to SocketFactory.pm introduces bug in Activestate

2003-07-10 Thread Rocco Caputo
mary here is just for people who were waiting for an answer or who are from the future (searching in archives). -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Another shutdown problem (solved)

2003-07-11 Thread Rocco Caputo
s one of them, consider storing/keying things on $session->ID(). Those are guaranteed not to repeat until integer overflow occurs. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Paging Wang Bo, regarding PreforkTCP

2003-07-13 Thread Rocco Caputo
Sorry to bug the list. I sent Wang Bo some patches to POE::Component::Server::PreforkTCP to remove the warnings I get when running it. The e-mail address in his documentation bounced, however. If you're out there, please let me know where I can send the patches. Thank you. -- Rocco C

Re: Module index tree for POE?

2003-07-16 Thread Rocco Caputo
as Perl itself (someone always asks). It should be easy enough to generate wiki markup. How hard is it be to update a wiki page from a cron job? -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Open to patches for POE::Component::Server::HTTP/SOAP ?

2003-07-16 Thread Rocco Caputo
t this may take a while. My last attempt at a grand unified object model for POE was container based, but it had issues that I found to be disappointing. I've written a report on poe.perl.org about why I think it failed. Dieter and Helen (and others) looked it over at YAPC::NA, and they h

Re: Module index tree for POE?

2003-07-16 Thread Rocco Caputo
On Thu, Jul 17, 2003 at 12:38:21AM -0400, Rocco Caputo wrote: > I've attached source for it. I didn't, but now I am. Honest this time. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/ #!/usr/bin/perl # $Id$ # Build a tree of POE modules. use warnings; use strict;

Re: POE beginner's question - use both Tk and HTTP server

2003-07-18 Thread Rocco Caputo
underlying file. I don't know what's causing Perl to report different ones. Some possibilities: ActiveState is doing something strange? That would be ruled out if you're not using ActivePerl. PerlIO is doing something strange? That's possible; I think ActivePerl uses Per

Re: some thoughts on multitasking

2003-07-20 Thread Rocco Caputo
. POE::Filter::Reference helps by encapsulating Perl data serialization. It's used to send arbitrarily complex Perl structures across sockets and pipes, including the pipes between parent and child processes. POE::Filter::Reference does not require the rest of POE to be loaded, so forked child processes may be relatively lightweight. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Wheel::Run and closing stdin

2003-07-25 Thread Rocco Caputo
Nobody's needed it---or at least asked for it---until now. It sounds like this may be something common. Do you have a test case or know of common programs this can be tested against? -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: alarm_set / delay_set, I can't get them to work!

2003-07-26 Thread Rocco Caputo
n P::C::IRC, there's a POE::Session->new() or ->create() call that lists all your event handlers. If you add do_every_10 and do_every_day, they should get called. Note, though, that alarm_set() does not set recurring alarms. You'll need to add another alarm_set() call to do_every_10() and do_every_day() to make them repeat. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: some Changes in http://poe.perl.org/?POE_Cookbook/Job_Server

2003-07-27 Thread Rocco Caputo
ror 0 (Normal disconnection) > I think, if it is a 'Normal disconnection' it is not woth to mention. A lot of people agree with you. I have committed a patch for this to CVS, and it'll be in the next release. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: some Changes in http://poe.perl.org/?POE_Cookbook/Job_Server

2003-07-28 Thread Rocco Caputo
error 104 > (Die Verbindung wurde vom Kommunikationspartner zurückgesetzt) > in English s.th like: > (Connection has been reset by the Client) > > This happens when the Client is killed (disconnected) while it is 'sleep'-ing > state. The closest I was a

Re: Job_Server

2003-07-28 Thread Rocco Caputo
buffered STDOUT. STDERR, by default, is not buffered, so output reaches the parent process in a timely fashion. Try setting $|=1 in the child program to turn off STDOUT buffering. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Capture STDERR

2003-07-29 Thread Rocco Caputo
}; $heap->{stderr_reader} = POE::Wheel::ReadWrite->new ( Handle => $read_stderr, Filter => POE::Filter::Line->new(), Driver => POE::Driver::SysRW->new(), InputEvent => "got_stderr", ); And you get "got_stderr&quo

Re: Signal delivery in POE and time warp.

2003-08-05 Thread Rocco Caputo
cally increasing value. Setting the time back two minutes: now(1060100580.89445) - then(1060100701.61873) = diff(-120.724280953407) ( clk_now(-1746079118) - clk_then(-1746063665) ) / CLOCKS_PER_SEC = -120.7265625 "now" and "then" being time() values, while "clk_now" and "clk_then" are POSIX::times() values. Are there any other sources of monotonic time available to Perl? -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: P::C::I Wrapper and Multiple Sessions.

2003-08-07 Thread Rocco Caputo
uname eatnopaste iname http://poe.dyndns.org:32087/ awaySaving humanity from evil paste. quit*byoop* flags +i cuinfo default user information cver pastebot 1.0 <http

Re: Whats the status on Spread in POE?

2003-08-11 Thread Rocco Caputo
eric persistence modules for Perl. I haven't tried any of them, so I can't recommend one. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: POE beginner's question - use both Tk and HTTP server

2003-08-11 Thread Rocco Caputo
build options that reproduce this. POE's own tests fail in ActivePerl and its Tk build, so it's possibly a common problem. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: IP-Addr. of connecting clients (to be able reject)

2003-08-14 Thread Rocco Caputo
nt connected from $remote_ip." ); } Other things are provided in Server::TCP sessions' heaps. See the end of the SYNOPSIS in perldoc POE::Component::Server::TCP. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Grandwheels or wheel-wheels question

2003-08-20 Thread Rocco Caputo
child process exits once function() returns. 2. Function won't return until POE::Kernel->run() does. 3. POE::Kernel->run() won't return until all sessions have stopped. 4. Sessions active in the parent process will be copied on fork. They may then be running in the parent and chi

Re: Grandwheels or wheel-wheels question

2003-08-20 Thread Rocco Caputo
OE::Filter::Line is probably better. If it's large binary stuff, POE::Filter::Stream, or a custom filter that understands your specific format. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: PoCo::Net::OSCAR

2003-08-21 Thread Rocco Caputo
oscar}->findconn(fileno($socket)); $conn->process_one(0, 1); } sub ex_ok { my ($heap, $socket) = @_[HEAP, ARG0]; my $conn = $heap->{oscar}->findconn(fileno($socket)); $kernel->select($socket); # stop the socket from POE $connection->{sockerr} = 1; $connection->disconnect(); } Good luck. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: PoCo::Net::OSCAR

2003-08-22 Thread Rocco Caputo
source/documentation on it to determine how to force that. > I can post the code if you're interested, but completely understand if > you've got bigger fish to fry. If it's not too big, go ahead and post it to the list. If it's big, post a link to it. Maybe someone else can fry this one. :) -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Creating a Daemon

2003-08-23 Thread Rocco Caputo
; > How am I supposed to build a server that when I start it, I get my prompt > back? [...] It's rather easy to daemonize a program, and it's covered in an existing CPAN module (Net::Server::Daemonize), so it hasn't been included in POE itself. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: PoCo::Net::OSCAR -- solved!

2003-08-23 Thread Rocco Caputo
d > perhaps even well-coded. I'll post it on the Wiki shortly. > > Thanks for the guidance, Rocco. I'm glad I could help. Consider releasing it to the CPAN, too. I think more people will find it at the CPAN than on the wiki. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Stopping the server from a client

2003-08-23 Thread Rocco Caputo
If your server isn't handling SIGTERM, it'll shut down after that. Things get interesting if you have any shutdown tasks to perform. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Follow-up: POE::Wheel::ReadLine problem

2003-08-24 Thread Rocco Caputo
Key(-1))) { > print "Foo\n"; > sleep (1); > } > print "Get key $key\n"; > ($key eq 'q') and last; > } > ReadMode 0; # Reset tty mode before exiting Another thing to try would be setbuf() or setvbuf() on STDIN. I could swear I saw somethi

Re: Routinely running something within a Component::Server::TCP

2003-08-25 Thread Rocco Caputo
also sets another timer for sixty seconds in the future, but only if the connection has not been shut down. This effectively polls for jobs once a minute, as long as the client is connected. It also guarantees that all enqueued jobs are handled. Caveat utilitor, or some junk: I haven't tested any of the above code. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Routinely running something within a Component::Server::TCP

2003-08-25 Thread Rocco Caputo
This will operate independently of the TCP server. If it must pass statuses back to TCP clients, try a connection registry like the one at http://poe.perl.org/?POE_Cookbook/Chat_Server -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: $session->callback() return value

2003-08-26 Thread Rocco Caputo
> Of course, since it's synchronous, I'm pretty sure inc'ing and dec'ing > the refcounts shouldn't matter, so I could also just take those bits > out. I also agree with this. Callbacks should therefore be pretty darned simple. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Passing variables

2003-08-28 Thread Rocco Caputo
t(some_session => some_event => \$data); $kernel->yield(some_event => \$data); sub some_event_handler { my $data_ref = $_[ARG0]; ..., } The yield() method is just a poorly named version of post() that assumes "some_session" is the same one it's called from. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Signal delivery in POE and time warp.

2003-08-29 Thread Rocco Caputo
nic clock source, and the lack of time to develop a portable class to wrap all the various system-dependent monotonic clocks. > P.S. What is an 'egg timer'? It is a short-duration cooking timer. Sometimes they are small hourglasses. Sometimes they are timers that you twist to start. I use them as the real-world analog of delay() timers. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Signal delivery in POE and time warp.

2003-08-29 Thread Rocco Caputo
On Fri, Aug 29, 2003 at 02:29:48PM -0400, Dmitri Tikhonov wrote: > On Fri, Aug 29, 2003 at 01:05:55AM -0400, Rocco Caputo wrote: > > On Thu, Aug 28, 2003 at 05:27:22PM -0400, Dmitri Tikhonov wrote: > > > Now let's consider alarms. Alarms that are called with time = time()

Re: Signal delivery in POE and time warp.

2003-09-02 Thread Rocco Caputo
tever event loop is being used, will require some additional clock checks. That slowdown---more system calls in the hottest code path---can't be helped, though. POE 0.26 is a quarter of a year old. The time-shift compensation feature is stalled in a major way, so I'm taking it off the goals list for 0.27. This may mean the feature won't be available for the "standard time" shift (backwards) coming in October. That's a tough call, but I'd rather see a new POE release than to hold it off for another couple months. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Signal delivery in POE and time warp.

2003-09-02 Thread Rocco Caputo
On Mon, Sep 01, 2003 at 10:01:26PM -0400, Peter Chen wrote: > On Friday, Aug 29, 2003, at 01:05 US/Eastern, Rocco Caputo wrote: > > >Sounds good, but also full of problems. It will require a lot of > >maintenance to support different monotonic timer functions for each &

Re: Signal delivery in POE and time warp.

2003-09-02 Thread Rocco Caputo
On Tue, Sep 02, 2003 at 06:21:44PM -0400, Peter Chen wrote: > On Tuesday, Sep 2, 2003, at 17:28 US/Eastern, Rocco Caputo wrote: > > >I have heard conflicting stories about whether the time shift is > >significant. Jeff Bisbee posted that systems based on UTC don't see &

Re: POE Ping script hanging

2003-09-03 Thread Rocco Caputo
E now. It'll be on your favorite CPAN mirror whenever the machines of industry copy it there. Thanks again. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Error checking

2003-09-07 Thread Rocco Caputo
eset by peer". > 3) Seems like there are only return codes from ->run method, are others kept > in the heap that I should be checking? I don't understand this question. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Re: Access to caller's time ?

2003-09-09 Thread Rocco Caputo
umentation would need patching to include DUE_TIME. Finally, patches would need to be sent (via [EMAIL PROTECTED]) to all the CPAN authors with POE::Session subclasses. Anyone want to hack POE's guts for fun and fame? :) -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

<    1   2   3   4   5   6   7   8   9   10   >