{"thread":{"id":"25450","subject":"[PATCH] t/gitweb-lib: Don't pass constant to decode_utf8","startedAt":"2010-10-14T19:36:09Z","lastAt":"2010-10-14T19:36:09Z","messageCount":1,"participants":["Brian Gernhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"153531","messageId":"1287084969-81868-1-git-send-email-brian@gernhardtsoftware.com","threadId":"25450","inReplyTo":null,"subject":"[PATCH] t/gitweb-lib: Don't pass constant to decode_utf8","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2010-10-14T19:36:09Z","receivedAt":"2010-10-14T19:36:09Z","isPatch":true,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"Running 'decode_utf8(\"\", Encode::FB_CROAK)' causes perl 5.10 to die on\nOS X 10.6.4 with:\n\nModification of a read-only value attempted at\n/Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/Encode.pm line\n216.\n\nThis is because Encode 2.40 updates the string to decode in-place when\na second argument is passed.  Work around this by passing an empty\nvariable ($_) instead of a constant string (\"\")\n\nSigned-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n---\n t/gitweb-lib.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh\nindex 8c490c8..c31d815 100644\n--- a/t/gitweb-lib.sh\n+++ b/t/gitweb-lib.sh\n@@ -80,7 +80,7 @@ if ! test_have_prereq PERL; then\n \ttest_done\n fi\n \n-perl -MEncode -e 'decode_utf8(\"\", Encode::FB_CROAK)' >/dev/null 2>&1 || {\n+perl -MEncode -e 'decode_utf8($_, Encode::FB_CROAK)' >/dev/null 2>&1 || {\n \tskip_all='skipping gitweb tests, perl version is too old'\n \ttest_done\n }\n-- \n1.7.3.1.139.g4284d\n"}]}