Re: POE::Preprocessor question

2006-09-24 Thread Dan McCormick
Hi, It looks like POE::Preprocessor became Filter::Template. I'll update PoCo::OSCAR soon. In the meantime, you can just install Filter::Template, and replace "use POE::Preprocessor" in POE/Component/OSCAR.pm with "use Filter::Template". I just tried it, and it seemed to work fine. If you have

bad param patch for PoCo::Client::TCP

2006-02-02 Thread Dan McCormick
Any objections to adding a check for bad params in Client::TCP? It would've saved me some recent typo-related head-scratching. I just stole the code from Server::TCP. Dan --- /usr/lib/perl5/site_perl/5.8.5/POE/Component/Client/TCP.pm 2004-07-15 10:01:38.0 -0400 +++ TCP.pm.my 2006-02-

POE::Component::OSCAR 0.03 released

2006-02-01 Thread Dan McCormick
Hi all, Just wanted to let everyone know that POE::Component::OSCAR 0.03 is out. I've included two sample scripts in the distribution, one is an OSCAR/telnet gateway, and the other uses Wheel::FollowTail to IM log lines to you. Changes since 0.02: - Added throttle argument to prevent rate problem

Re: Problems sending to stdin of POE::Wheel::Run-spawned process

2004-12-23 Thread Dan McCormick
> I briefly considered whether the wheel should guarantee flushing on > shutdown, but I decided against it. Sometimes people may want to shut > down a client regardless of the input waiting for it. > > Maybe the shutdown methods need flush/immediate options? That would definitely be convenient.

Re: Problems sending to stdin of POE::Wheel::Run-spawned process

2004-12-22 Thread Dan McCormick
nting get_driver_out_octets and get_driver_out_messages in POE::Wheel::Run (or POE::Wheel?) since they aren't mentioned anywhere? Dan On 12/21/04 9:57 PM, "Rocco Caputo" <[EMAIL PROTECTED]> wrote: > On Tue, Dec 21, 2004 at 08:39:53PM -0800, Dan McCormick wrote: >> So consider this: &g

Re: Problems sending to stdin of POE::Wheel::Run-spawned process

2004-12-21 Thread Dan McCormick
o be working -- it always seems to return false, even though if I then call stdin_shutdown the data never arrives at my process. Any suggestions? Am I missing something? Thanks, Dan On 12/21/04 3:18 PM, "Rocco Caputo" <[EMAIL PROTECTED]> wrote: > On Mon, Dec 20, 2004 at 10:4

Problems sending to stdin of POE::Wheel::Run-spawned process

2004-12-20 Thread Dan McCormick
Hi, Shouldn't the code below print 1, 2, 3, 4 on separate lines to the file /tmp/test.txt? If I comment out lines 537-538 of POE::Wheel::Run.pm, namely: $poe_kernel->select_pause_write($self->[HANDLE_STDIN]) unless ($self->[OCTETS_STDIN]); ... things work as (I) expected. Some cursory de

help with PoCo::OSCAR

2004-09-19 Thread Dan McCormick
As some of you have noticed, POE::Component::OSCAR, a module that allows you to use Net::OSCAR with POE, doesn't always work. During some head-scratching, I noticed that it worked most of the time on a 500MHz machine but always failed on a 2.0GHz box. On a whim, I added a "sleep 1" to a section o

Re: AIM/OSCAR Component?

2004-04-17 Thread Dan McCormick
Back in August, Dan McCormick said he had written (and documented!) > POE::Component::Net::OSCAR. There's call for such a beast if it still > exists. Has anyone seen it lately? > > -- Rocco Caputo

Re: fork and talking to parent

2003-12-05 Thread Dan McCormick
Hi Jay, Have you played with POE::Wheel::Run? It seems suited to what you're doing: "Wheel::Run spawns child processes and establishes non-blocking, event based communication with them." Give that a try and let us know how you fare. Dan On Thu, 2003-12-04 at 19:09, Jay Strauss wrote: > Hi, >

Re: Beginner's Question - Tk and POE

2003-12-03 Thread Dan McCormick
Hi Tom, POE uses the concept of sessions, which are similar to threads. POE::Component::Client::TCP (hereafter Poco::TCP) spawns a new session, which is distinct from the main session of the rest of your app. Each session has its own distinct heap. So, first off, wrt your application, saying...

Re: POE Ping script hanging

2003-08-29 Thread Dan McCormick
. Any ideas on how to accomplish this? Thanks... > > > > "Dan McCormick" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > > > You just need to call exit() at some point. This will stop your script > > and close your f

Re: POE Ping script hanging

2003-08-28 Thread Dan McCormick
Hi, You just need to call exit() at some point. This will stop your script and close your file. How and when to do that is another matter -- you may want to push the addresses you ping onto an array, and then pop them off in client_got_pong(). When the array is empty, exit. Or do the same thin

$session->callback() return value

2003-08-25 Thread Dan McCormick
Actually, whaddya say we return the actual return value of the callback instead of POSTBACK_RETVAL? As you know, POSTBACK_RETVAL is hard coded to zero for postback, but looking over a Gtk mailing list, someone notes: "Event signals return a boolean value. Gtk uses this value to decide whether to

Re: $session->callback

2003-08-25 Thread Dan McCormick
On Sat, 2003-08-23 at 19:22, Rocco Caputo wrote: > On Sat, Aug 23, 2003 at 04:04:26PM -0400, Dan McCormick wrote: > > (Which raises the question: has there been talk of a synchronous > > "$session->callback()"?) > > Not until today. :) If you look at the pos

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

2003-08-23 Thread Dan McCormick
On Fri, 2003-08-22 at 17:38, Rocco Caputo wrote: > On Fri, Aug 22, 2003 at 03:09:59PM -0400, Dan McCormick wrote: [...] > fileno() returning undef is a great way to check for a closed file. > Your problem is you're ignoring it. Try this instead: > > unless (de

Re: PoCo::Net::OSCAR

2003-08-22 Thread Dan McCormick
riginal socket. Can something happen so that a socket and its fileno become dissociated? I can post the code if you're interested, but completely understand if you've got bigger fish to fry. Thanks, Dan On Thu, 2003-08-21 at 21:10, Rocco Caputo wrote: > On Thu, Aug 21, 2003 at 04:

PoCo::Net::OSCAR

2003-08-21 Thread Dan McCormick
Howdy, If no one's released a PoCo::Net::OSCAR (i.e. the public face of AOL's IM), I've got one to offer. However, I was hoping for a bit of feedback first, because I'm not sure I've gone about it in the best way. The Net::OSCAR module is very nice in that it can use other event loops. The only

Re: problems using package methods...

2003-06-23 Thread Dan McCormick
Hi Josh, If Ping.pm is a separate file, you need to "use POE" to import the KERNEL, HEAP, etc. constants. Try that and see if things improve. Dan Josh wrote: > > I am having a strange problem w/package methods not seeming to work > properly, at least as far as I understand them. This is my fi

changing object/session interfaces

2002-04-24 Thread Dan McCormick
Hi, Does anyone have any advice for writing a POE object/session in such a way that the main program doesn't need to know all its states? The problem is that if you write 20 programs that use one POE object/session, and then add an internal, private state to that object/session, it won't be able

conditionally using ASSERT_STATES

2002-03-18 Thread Dan McCormick
Howdy, This is more of a Perl question, but since it's POE-related... How do you conditionally turn on something like ASSERT_STATES? I'd like to do something like... if ($TEST_MODE) { sub POE::Kernel::ASSERT_STATES () { 1 } } use POE; but of course the subroutine gets compiled regardl

ReadWrite wheels, InputStates, and error events

2001-12-14 Thread Dan McCormick
Hi, I discovered something -- not sure if it's a bug or a feature -- but it's worth noting: When using ReadWrite wheels to just send data (is there a better method?), defining an empty InputState (or, presumably, any InputState, but since we're just sending data "InputState => ''" will suffice)

ikc question

2001-08-27 Thread Dan McCormick
Hi, I have a few IKC questions... I'm monitoring client connections using IKC => 'monitor', '*' => { register => 'client_connect' } When a client connects, the 'client_connect' state gets called *three* times, each time with a different kernel alias, which wi

problems with $kernel->delay and Gtk - follow-up

2001-08-16 Thread Dan McCormick
go2 { print "Hit2 ", Time::HiRes::time, "\n"; } Original Message Subject: problems with $kernel->delay and Gtk Date: Wed, 15 Aug 2001 16:22:31 -0400 From: Dan McCormick <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Hi, Has anyone had any problems us

problems with $kernel->delay and Gtk

2001-08-15 Thread Dan McCormick
Hi, Has anyone had any problems using $kernel->delay and Gtk? In my application, setting a delay of one second takes 15 seconds to process. But if I take out the "use Gtk" statement, it works fine. I can't seem to reproduce the code in a small snippet, so until I whittle it down further I thou