[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason-devel
Subject:    [Mason-devel] changes to Request.pm
From:       Jonathan Swartz <swartz () pobox ! com>
Date:       2002-03-15 1:14:32
[Download RAW message or body]

The top_level_predicate exploration I was doing led to some fundamental
changes in how Request works. Apologies for not discussing this first; if it
turns out badly we can roll it back.

The main changes are:

1. Request object now gets *created* with a comp and args. Request::exec()
no longer takes arguments. This goes along with the assertion that a Request
should only handle one request.

2. $m->make_subrequest is now the preferred mechanism to create a
subrequest. The subrequest inherits read-write properties (e.g. autoflush,
error_format) from the parent request. So, making a subrequest now looks
like
  my $subreq = $m->make_subrequest(comp=>..., args=>..., ... other request
params ...);
  $subreq->exec;

Some minor related changes that fell out of this:

3. $m->subexec($comp, @args) is a synonym for the above two lines for the
common case when no request params need to change.

4. $m->decline is now implemented simply with subrequests. This allowed me
to remove the ugly decline loop and _reinitialize().

5. ApacheHandler now has an alternate lower-level interface:
   my $m = $ah->prepare_request;
   # examine request ($m), top-level component ($m->top_comp) and args
($m->top_args)
   $m->exec;
with $ah->handle_request a wrapper around the above two lines.

All tests except for 08-ah.t pass for me. I will work on this next.

Jon

_______________________________________________
Mason-devel mailing list
Mason-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic