That is a very good point. I do know my original intentions were to
require the guts everytime reset() was called. And you are right that
it isn't consistent and that it isn't documented very well. I am going
to have some time this weekend to sit down and resolve your tickets
including this one. Thanks for even bothering to take the time. It
certainly helps me.
On Fri Oct 20 10:55:46 2006, ewaters@uarc.com wrote:
Show quoted text> I hate to argue the point, but if this is not a bug, I'll have to
> submit another bug:
>
> File: POE-Component-Jabber-
> 1.21/lib/POE/Component/Jabber/Server/Socket.pm
>
> On line 61:
>
> $heap->{'filter'} = POE::Filter::XML->new(undef, $heap-
> >{'callback'});
>
> the POE::Filter::XML object is created with the defined callback in
> the build_socket() subroutine. Later, in step_tls() (line 88) and
> step_sasl() (line 131) the filter is reset:
>
> $heap->{'filter'}->reset();
>
> Since you're stating that it's somehow expected (but not documented I
> might add) that the reset will clear the callback, these two lines
> need to be changed to:
>
> $heap->{'filter'}->reset( $heap->{'callback'} );
>
> I'd like to point out that the meta is not deleted if it's not passed
> to reset(), but callback is. Just seems inconsistent. Also, please
> change documentation. It currently reads:
>
> Since POE::Filter::XML follows the POE::Filter API look to
> POE::Filter for documentation. The only method covered here is new()
>
> It should mention reset() as well since this is a custom function and
> not part of the POE::Filter API.
>
> Eric
>
> On Thu, Oct 19, 2006 at 06:26:42PM -0400, via RT wrote:
> reset
> > the state of the Filter. The callback may very well be context
> dependant
> > and once the filter is reset, calling the wrong callback may have
> other
> > developers complain to me about the opposite of what you are
> complaining
> > about.
> >
> > You do unintentionally bring up a good point: the error callback
> needs
> > more than one entry point (aka. get_error_callback(),
> > set_error_callback()) and I believe I will implement this in the
> next
> > release. This way when you need to reset() the filter, you can
> retain
> > your same callback coderef.
> >
> > Thanks,
> >
> > Nick
> >
> > On Thu Oct 19 17:48:17 2006, ewaters@uarc.com wrote:
> > > Distribution: POE-Filter-XML-0.29
> > >
> > > File: POE-Filter-XML-0.29/lib/POE/Filter/XML.pm
> > > Line: 91
> > >
> > > Problems:
> > >
> > > Code deletes the callback if it's not passed to reset(). This
> breaks
> > > the callback if the users resets the filter. There's no need for
> > > this, and is a bug.
> > >
> > > Eric Waters
> >
> >
> >
> >
> >
>