Josh Narins <[EMAIL PROTECTED]> wrote:

>> Is it breaking anything?
> 
> A fixup handler that says "if the url matches /baz/" then do a little work 
> here. That work ends up getting done twice (including, in just one instance, 
> saving something to the DB, where I get double entries). For instance, 
> /object/staff and /otherobject/staff both trigger the same fixup handler, 
> because $r->uri =~ m#/staff#, regardless of /object or /otherobject at the 
> beginning.
> 
> Maybe it wasn't the soundest design principle in the first place, but, hey, 
> I wasn't expecting _this_.

I think in general your handlers should be prepared to be called on
subrequests.  If one extra request is a problem, just imagine the hilarity
that will ensue when you get a directory request with indexes enabled.

You can, for example, check $r->is_initial_req and do your thing if so.

-- 
Jeremy  |  [EMAIL PROTECTED]

Reply via email to