aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/CGI_wrapper_doesn__39__t_store_PERL5LIB_environment_variable.mdwn
diff options
context:
space:
mode:
authorsmcv <smcv@web>2014-09-14 14:03:00 -0400
committeradmin <admin@branchable.com>2014-09-14 14:03:00 -0400
commitf35fc6a603b5473ce2c07bb0236e28e57f718315 (patch)
tree04dc7a1a08fa95fd44636ce935de204b62045f19 /doc/bugs/CGI_wrapper_doesn__39__t_store_PERL5LIB_environment_variable.mdwn
parent0bc89ad1426c8b383936db95a5e40b6187828db0 (diff)
downloadikiwiki-f35fc6a603b5473ce2c07bb0236e28e57f718315.tar
ikiwiki-f35fc6a603b5473ce2c07bb0236e28e57f718315.tar.gz
review
Diffstat (limited to 'doc/bugs/CGI_wrapper_doesn__39__t_store_PERL5LIB_environment_variable.mdwn')
-rw-r--r--doc/bugs/CGI_wrapper_doesn__39__t_store_PERL5LIB_environment_variable.mdwn21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/bugs/CGI_wrapper_doesn__39__t_store_PERL5LIB_environment_variable.mdwn b/doc/bugs/CGI_wrapper_doesn__39__t_store_PERL5LIB_environment_variable.mdwn
index 7655d401a..9da25157f 100644
--- a/doc/bugs/CGI_wrapper_doesn__39__t_store_PERL5LIB_environment_variable.mdwn
+++ b/doc/bugs/CGI_wrapper_doesn__39__t_store_PERL5LIB_environment_variable.mdwn
@@ -31,3 +31,24 @@ As I am not sure that remembering `PERL5LIB` is a good idea, I think that a pret
[This change](https://github.com/jcflack/ikiwiki/commit/bc4721da0441a30822225c51b250be4cc5f8af24) moves the `%config{ENV}` handling earlier in the wrapper, so anything specified there is placed back in the actual environment before Perl gets control. Problem solved!
-- Chap
+
+> Thanks, this looks like a nicer solution than the above. Some review:
+>
+> + $val =~ s/([\\"])/\\$1/g;
+>
+> This is *probably* OK, because the configuration is unlikely to include
+> non-ASCII, but I'd prefer something that covers all possibilities,
+> like this:
+>
+> my $tmp = $val;
+> utf8::encode($tmp) if utf8::is_utf8($tmp);
+> $tmp =~ s/([^A-Za-z0-9])/sprintf "\\x%02x", $1/ge;
+>
+> and then passing $tmp to addenv.
+>
+> + delete $config{ENV};
+>
+> I don't think this is particularly necessary: there doesn't seem any harm
+> in having it in the storable too?
+>
+> --[[smcv]]