> The question still stands. Do we want:
>
> sub init {}
> sub filt : FilterRequestHandler FilterPreHandler(init) {}
>
> or
>
> sub init : FilterPreHandler {}
> sub filt : FilterRequestHandler FilterNeedsPreHandler(init) {}
the first seems to make the most sense to me - I don't see why we need
to make the pre handler take an attribute only to create another
attribute to run it.
Well, I agree with you. It's just that I don't feel very happy about
linguistics. Currently attributes indentify the properties of the
filters. FilterPreHandler(init) has nothing to do with the real filter,
other than creating a dependency.
well, for some it can really be considered part of the filter itself,
since the filter may not behave correctly without it :)
But I guess it's just a matter of
getting used to it. However if you see what I mean, won't
FilterRunsPreHandler(init) sound more like a property:
sub filt : FilterRequestHandler FilterRunsPreHandler(init) {}
So in English we can say that filter 'filt' is a request filter handler
that runs prehandler 'init'.
Whereas FilterPreHandler can thought as being the prehandler.
See what I mean?
yeah. I guess I can see both sides and don't have any strong opinions
either way. or maybe I'm starting to like what you just said more,
making each an attribute. I like FilterRunsPreHandler better than
NeedsPreHandler, in either case.
Also:
sub init : FilterPreHandler {}
makes it sure that that sub won't be used in any other way, than
designed. But that could be redundant I suppose.
maybe that kind of protection is useful. I was thinking that other
handlers may want to share the logic within the init handler, but as I
think of it more it seems unlikely.
> Anyways, I've changed a bit the expectations and the response handler
> and voila, it works ;)
>
> the new version is attached.
ah, cool. the output filter test worked too.
I'd say commit all this stuff - we certainly have enough to work with
now, and we can build on it as we go.
Looking forward to see your conditional GET tests and may be other
interesting apps.
yeah, as I work out the details of conditional GETs I'll add some
tests. it will be a while, though - I still have some thinking to do.
very nice work, stas.
;)
I still have to complete the source parsing to support fully blown perl
code as an argument to FilterPreHandler().
no rest for the weary :)
--Geoff
|