{"thread":{"id":"25485","subject":"[PATCH v2] t/gitweb-lib: Don't pass constant to decode_utf8","startedAt":"2010-10-20T05:57:11Z","lastAt":"2010-10-20T23:07:10Z","messageCount":5,"participants":["Brian Gernhardt","Jakub Narebski"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"153850","messageId":"1287554231-84196-1-git-send-email-brian@gernhardtsoftware.com","threadId":"25485","inReplyTo":null,"subject":"[PATCH v2] t/gitweb-lib: Don't pass constant to decode_utf8","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2010-10-20T05:57:11Z","receivedAt":"2010-10-20T05:57:11Z","isPatch":true,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"Encode.pm started updating the string to decode in-place when a second\nargument is passed in version 2.40.  This causes 'decode_utf8(\"\",\nEncode::FB_CROAK)' to die with a message like:\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\nWork around this by passing an empty variable instead of a constant\nstring.\n\nSigned-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n---\n\n Changes since v1:\n - Use an explicitly empty variable instead of $_\n - Clearer commit message\n - CC people who worked on t/gitweb-lib.sh\n - based against maint\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 81ef2a0..1b9523d 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 '$e=\"\";decode_utf8($e, Encode::FB_CROAK)' >/dev/null 2>&1 || {\n     skip_all='skipping gitweb tests, perl version is too old'\n     test_done\n }\n-- \n1.7.3.1.209.g52408\n"},{"id":"153880","messageId":"201010202105.59370.jnareb@gmail.com","threadId":"25485","inReplyTo":"1287554231-84196-1-git-send-email-brian@gernhardtsoftware.com","subject":"Re: [PATCH v2] t/gitweb-lib: Don't pass constant to decode_utf8","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-10-20T19:05:58Z","receivedAt":"2010-10-20T19:05:58Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Wed, 20 Oct 2010, Brian Gernhardt wrote:\n\n> Encode.pm started updating the string to decode in-place when a second\n> argument is passed in version 2.40.  This causes 'decode_utf8(\"\",\n> Encode::FB_CROAK)' to die with a message like:\n\nVery minor complaint: line break here makes it less readable.\n\nPerhaps this?\n\n  Encode.pm started updating the string to decode in-place when a second argument\n  is passed in version 2.40.  This causes 'decode_utf8(\"\", Encode::FB_CROAK)' to\n  die with a message like:\n\n\n> \n> Modification of a read-only value attempted at\n> /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/Encode.pm line\n> 216.\n\nVery minor complaint: It might be better to not include path to installed\nEncode.pm, which is different on different filesystems.\n\n  Modification of a read-only value attempted at .../Encode.pm line\n  216.\n\n> \n> Work around this by passing an empty variable instead of a constant\n> string.\n> \n> Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n\nAcked-by: Jakub Narebski <jnareb@gmail.com>\n\n> ---\n> \n>  Changes since v1:\n>  - Use an explicitly empty variable instead of $_\n\n...which was undefined, not empty, I think.\n\n>  - Clearer commit message\n\nIt is very clear (though I don't remember previous one).\n\n>  - CC people who worked on t/gitweb-lib.sh\n\nThanks a lot.\n\n>  - based against maint\n\nWas there any difference versus being based against 'master'?\n\n> \n>  t/gitweb-lib.sh |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh\n> index 81ef2a0..1b9523d 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 '$e=\"\";decode_utf8($e, Encode::FB_CROAK)' >/dev/null 2>&1 || {\n>      skip_all='skipping gitweb tests, perl version is too old'\n>      test_done\n>  }\n\nNicely done! Thanks!\n\n-- \nJakub Narebski\nPoland\n"},{"id":"153898","messageId":"3E0E134D-276A-4CA1-965D-274A6AA188C1@gernhardtsoftware.com","threadId":"25485","inReplyTo":"201010202105.59370.jnareb@gmail.com","subject":"Re: [PATCH v2] t/gitweb-lib: Don't pass constant to decode_utf8","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2010-10-20T22:13:44Z","receivedAt":"2010-10-20T22:13:44Z","isPatch":true,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"\nOn Oct 20, 2010, at 3:05 PM, Jakub Narebski wrote:\n\n> On Wed, 20 Oct 2010, Brian Gernhardt wrote:\n> \n>> Encode.pm started updating the string to decode in-place when a second\n>> argument is passed in version 2.40.  This causes 'decode_utf8(\"\",\n>> Encode::FB_CROAK)' to die with a message like:\n> \n> Very minor complaint: line break here makes it less readable.\n> \n> Perhaps this?\n> \n>  Encode.pm started updating the string to decode in-place when a second argument\n>  is passed in version 2.40.  This causes 'decode_utf8(\"\", Encode::FB_CROAK)' to\n>  die with a message like:\n\nThe wrapping was automatically done by vim.  I'll try tweaking width/contents to make it flow better.\n\n>> Modification of a read-only value attempted at\n>> /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/Encode.pm line\n>> 216.\n> \n> Very minor complaint: It might be better to not include path to installed\n> Encode.pm, which is different on different filesystems.\n> \n>  Modification of a read-only value attempted at .../Encode.pm line\n>  216.\n\n>> Changes since v1:\n>> - Use an explicitly empty variable instead of $_\n> \n> ...which was undefined, not empty, I think.\n\nIt still served to test the two argument case, but I thought an explicit variable that exactly matched the previous call would be better.\n\n>> - based against maint\n> \n> Was there any difference versus being based against 'master'?\n\nWhitespace in context lines.  The skip_all and test_done lines were re-indented at some point.  Minor, but I thought I'd mention it.\n\n~~ Brian\n"},{"id":"153902","messageId":"201010210028.06569.jnareb@gmail.com","threadId":"25485","inReplyTo":"3E0E134D-276A-4CA1-965D-274A6AA188C1@gernhardtsoftware.com","subject":"Re: [PATCH v2] t/gitweb-lib: Don't pass constant to decode_utf8","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-10-20T22:28:05Z","receivedAt":"2010-10-20T22:28:05Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Thu, 21 Oct 2010, Brian Gernhardt wrote:\n> On Oct 20, 2010, at 3:05 PM, Jakub Narebski wrote:\n>> On Wed, 20 Oct 2010, Brian Gernhardt wrote:\n>> \n>>> Encode.pm started updating the string to decode in-place when a second\n>>> argument is passed in version 2.40.  This causes 'decode_utf8(\"\",\n>>> Encode::FB_CROAK)' to die with a message like:\n>> \n>> Very minor complaint: line break here makes it less readable.\n>> \n>> Perhaps this?\n>> \n>>  Encode.pm started updating the string to decode in-place when a second argument\n>>  is passed in version 2.40.  This causes 'decode_utf8(\"\", Encode::FB_CROAK)' to\n>>  die with a message like:\n> \n> The wrapping was automatically done by vim.  I'll try tweaking\n> width/contents to make it flow better.\n\nNote that it is just nitpicking: the commit message is quite fine as\nit is.\n\n>>> Changes since v1:\n>>> - Use an explicitly empty variable instead of $_\n>> \n>> ...which was undefined, not empty, I think.\n> \n> It still served to test the two argument case, but I thought an explicit\n> variable that exactly matched the previous call would be better. \n\nIt is better, IMHO.\n\n>>> - based against maint\n>> \n>> Was there any difference versus being based against 'master'?\n> \n> Whitespace in context lines.  The skip_all and test_done lines were\n> re-indented at some point.  Minor, but I thought I'd mention it. \n\nO.K.\n\nThanks again.\n-- \nJakub Narebski\nPoland\n"},{"id":"153906","messageId":"1287616030-88078-1-git-send-email-brian@gernhardtsoftware.com","threadId":"25485","inReplyTo":"201010202105.59370.jnareb@gmail.com","subject":"[PATCH v3 (maint)] t/gitweb-lib: Don't pass constant to decode_utf8","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2010-10-20T23:07:10Z","receivedAt":"2010-10-20T23:07:10Z","isPatch":true,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"Encode.pm started updating the string to decode in-place when\na second argument is passed in version 2.40.  This causes\n'decode_utf8(\"\", Encode::FB_CROAK)' to die with a message like:\n\nModification of a read-only value attempted at .../Encode.pm line 216.\n\nWork around this by passing an empty variable instead of a constant\nstring.\n\nSigned-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\nAcked-by: Jakub Narebski <jnareb@gmail.com>\n---\n Changes since v2:\n - Re-wrapped first paragraph for easier reading\n - Removed long OS X-specific Perl library path\n - Added Ack\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 81ef2a0..1b9523d 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 '$e=\"\";decode_utf8($e, Encode::FB_CROAK)' >/dev/null 2>&1 || {\n     skip_all='skipping gitweb tests, perl version is too old'\n     test_done\n }\n-- \n1.7.3.1.209.g52408\n"}]}