in reply to Access Request Object from RAWPERL block in Template Toolkit template

TT templates with RAWPERL blocks are a maintenance nightmare. Simply copy all the request parameters you need to your %vars hash and pass that to TT. This also gives you the chance to gracefully handle any exceptions raised by $request->param().

Maybe your data inconsistency problems are a side effect of Apache2::Request's on-demand parsing strategy?