[svn:p5ee] r13908 - p5ee/trunk/App-Context/lib/App/Request
[email protected] Mon, 19 Apr 2010 11:23:53 -0700 (PDT)
| Newsgroups | perl.cvs.p5ee |
|---|---|
| Message-ID | <[email protected]> |
Author: spadkins
Date: Mon Apr 19 11:23:51 2010
New Revision: 13908
Modified:
p5ee/trunk/App-Context/lib/App/Request/CGI.pm
Log:
Introduced the replay_env and replay_vars options to allow for using alternative (saved) env and vars files during a replay. This should help when running replay in live systems where many requests are constantly coming in and overwriting the env and vars files while you are trying to replay something.
Modified: p5ee/trunk/App-Context/lib/App/Request/CGI.pm
==============================================================================
--- p5ee/trunk/App-Context/lib/App/Request/CGI.pm (original)
+++ p5ee/trunk/App-Context/lib/App/Request/CGI.pm Mon Apr 19 11:23:51 2010
@@ -99,7 +99,7 @@
#################################################################
if ($replay) {
- $file = "$app.env";
+ $file = $options->{replay_env} || "$app.env";
if (open(App::FILE, "< $file")) {
foreach $var (keys %ENV) {
delete $ENV{$var}; # unset all environment variables
@@ -132,7 +132,7 @@
if ($replay) {
# when the "debug_request" is in "replay", the saved CGI environment from
# a previous query (when "debug_request" was "record") is used
- $file = "$app.vars";
+ $file = $options->{replay_vars} || "$app.vars";
open(App::FILE, "< $file") || die "Unable to open $file: $!";
$cgi = new CGI(*App::FILE); # Get vars from debug file
close(App::FILE);