At Wed, 25 Jun 2003 12:55:43 -0500, Neil Gunton wrote: > To take just one example, in my current site I call > $req_rec->update_mtime() to set the modification time for the page, > whereas in 2.x you have to have something like > $req->apache_req->update_mtime(). [...] > How hard would it be to include "compatibility" objects and methods > so that code will work under both 1.x and 2.x? So I could count on, > for example, $req_rec being there in either version?
Gerald's post says that this is actually a bug, but if it weren't, you could easily do this in your base.epl: [! sub apache_req { $req_rec || $_[0]->SUPER::apache_req } !] which should return $req_rec if it exists (in 1.3 or a bugfixed 2.0), else it calls the normal 2.0 $req->apache_req. other pages could then be modified to always use the 2.0 syntax. you could use a EMBPERL_OBJECT_HANDLER_CLASS to provide these "missing" methods even more invisibly. you would only set EMBPERL_OBJECT_HANDLER_CLASS in your 1.3 setup of course. -- - Gus --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]