From: Jeremy Nixon <[EMAIL PROTECTED]>
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.
Sounds like more than a laugh a minute.
You can, for example, check $r->is_initial_req and do your thing if so.
Any advice on tracking this down?
_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement