Actually, the code works as is, but, I was wondering if there was a POE
built in method for accomplishing the same thing. the $poe_kernel->run at
the top doesn't really do anything (except prevent a runtime error), because
I haven't created a POE object yet
Jay
----- Original Message -----
From: "Tim Wood" <[EMAIL PROTECTED]>
To: "Jay Strauss" <[EMAIL PROTECTED]>
Sent: Saturday, January 31, 2004 1:50 AM
Subject: Re: Catching connect_error
> At 10:23 PM 1/30/04, you wrote:
> >Hi,
> >
> >I'm trying to trap a ConnectError, and return if it occurs. ...
> >
> >sub new {
> >...
> > $poe_kernel->run;
> >
> > POE::Component::Client::TCP->new(
> > RemoteAddress => "localhost",...
>
> My understanding is that the TCP->new call will not be reached because you
are calling $poe_kernel->run(), which AFAIK doesn't return until POE exits,
before it. I follow the pattern of creating all my POE-ish objects with
calls from main::, then calling POE::Kernel->run as the last thing in
main::.
> HTH,
> TW
>
>
>
>