{"thread":{"id":"24224","subject":"[PATCH] t/t9700/test.pl: don't access private object members, use public access methods","startedAt":"2010-06-28T22:51:02Z","lastAt":"2010-06-29T16:33:23Z","messageCount":4,"participants":["Brandon Casey","Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"144427","messageId":"OYRSzEHOHSti8exa5KJzWIUEyJ8xb2sfcvm4pUcvYhBXldZMw8JzP6a6cRcRRIZjiOtW9kzmnVA@cipher.nrlssc.navy.mil","threadId":"24224","inReplyTo":null,"subject":"[PATCH] t/t9700/test.pl: don't access private object members, use public access methods","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2010-06-28T22:51:02Z","receivedAt":"2010-06-28T22:51:02Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nThis test is accessing private object members of the Test::More and\nTest::Builder objects.  Older versions of Test::More did not implement\nthese variables using a hash.\n\nMy system complains as follows:\n\n   Can't coerce array into hash at <snip>/t/t9700/test.pl line 13.\n   BEGIN failed--compilation aborted at <snip>/t/t9700/test.pl line 15.\n\nThere are public access methods available for retrieving and setting these\nvariables, so let's use them instead.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t9700/test.pl |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t9700/test.pl b/t/t9700/test.pl\nindex f2820d2..671f38d 100755\n--- a/t/t9700/test.pl\n+++ b/t/t9700/test.pl\n@@ -10,8 +10,8 @@ use Test::More qw(no_plan);\n BEGIN {\n \t# t9700-perl-git.sh kicks off our testing, so we have to go from\n \t# there.\n-\tTest::More->builder->{Curr_Test} = 1;\n-\tTest::More->builder->{No_Ending} = 1;\n+\tTest::More->builder->current_test(1);\n+\tTest::More->builder->no_ending(1);\n }\n \n use Cwd;\n@@ -113,7 +113,7 @@ like($last_commit, qr/^[0-9a-fA-F]{40}$/, 'rev-parse returned hash');\n my $dir_commit = $r2->command_oneline('log', '-n1', '--pretty=format:%H', '.');\n isnt($last_commit, $dir_commit, 'log . does not show last commit');\n \n-printf \"1..%d\\n\", Test::More->builder->{Curr_Test};\n+printf \"1..%d\\n\", Test::More->builder->current_test;\n \n my $is_passing = eval { Test::More->is_passing };\n exit($is_passing ? 0 : 1) unless $@ =~ /Can't locate object method/;\n-- \n1.6.6.2\n"},{"id":"144438","messageId":"AANLkTik3L7VcjezVK_8PCKsSpNFaTfYNvsOAgckhv-6K@mail.gmail.com","threadId":"24224","inReplyTo":"OYRSzEHOHSti8exa5KJzWIUEyJ8xb2sfcvm4pUcvYhBXldZMw8JzP6a6cRcRRIZjiOtW9kzmnVA@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] t/t9700/test.pl: don't access private object members, use public access methods","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-06-29T02:19:50Z","receivedAt":"2010-06-29T02:19:50Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Mon, Jun 28, 2010 at 22:51, Brandon Casey <casey@nrlssc.navy.mil> wrote:\n> From: Brandon Casey <drafnel@gmail.com>\n>\n> This test is accessing private object members of the Test::More and\n> Test::Builder objects.  Older versions of Test::More did not implement\n> these variables using a hash.\n>\n> My system complains as follows:\n>\n>   Can't coerce array into hash at <snip>/t/t9700/test.pl line 13.\n>   BEGIN failed--compilation aborted at <snip>/t/t9700/test.pl line 15.\n\nJust for the record, what version of Test::More is that:\n\n    perl -MTest::More -le 'print $Test::More::VERSION'\n\n> There are public access methods available for retrieving and setting these\n> variables, so let's use them instead.\n>\n> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n\nThis looks good, sorry for the API mistake on my part.\n\nAcked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n"},{"id":"144460","messageId":"9GBPdCANIkJqMOijhTovNxubG4uDjhkPBiOv42hdrzS-K6oLSFiVLg@cipher.nrlssc.navy.mil","threadId":"24224","inReplyTo":"AANLkTik3L7VcjezVK_8PCKsSpNFaTfYNvsOAgckhv-6K@mail.gmail.com","subject":"Re: [PATCH] t/t9700/test.pl: don't access private object members, use public access methods","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2010-06-29T13:21:00Z","receivedAt":"2010-06-29T13:21:00Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"On 06/28/2010 09:19 PM, Ævar Arnfjörð Bjarmason wrote:\n> On Mon, Jun 28, 2010 at 22:51, Brandon Casey <casey@nrlssc.navy.mil> wrote:\n>> From: Brandon Casey <drafnel@gmail.com>\n>>\n>> This test is accessing private object members of the Test::More and\n>> Test::Builder objects.  Older versions of Test::More did not implement\n>> these variables using a hash.\n>>\n>> My system complains as follows:\n>>\n>>   Can't coerce array into hash at <snip>/t/t9700/test.pl line 13.\n>>   BEGIN failed--compilation aborted at <snip>/t/t9700/test.pl line 15.\n> \n> Just for the record, what version of Test::More is that:\n> \n>     perl -MTest::More -le 'print $Test::More::VERSION'\n\n0.47 which is available on RHEL 4.X\n\n>> There are public access methods available for retrieving and setting these\n>> variables, so let's use them instead.\n>>\n>> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n> \n> This looks good, sorry for the API mistake on my part.\n\nNo problem.\n\n-brandon\n"},{"id":"144472","messageId":"7v8w5xbxyk.fsf@alter.siamese.dyndns.org","threadId":"24224","inReplyTo":"9GBPdCANIkJqMOijhTovNxubG4uDjhkPBiOv42hdrzS-K6oLSFiVLg@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] t/t9700/test.pl: don't access private object members, use public access methods","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-06-29T16:33:23Z","receivedAt":"2010-06-29T16:33:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brandon Casey <casey@nrlssc.navy.mil> writes:\n\n>>> There are public access methods available for retrieving and setting these\n>>> variables, so let's use them instead.\n>>>\n>>> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n>> \n>> This looks good, sorry for the API mistake on my part.\n>\n> No problem.\n\nThanks, both of you.\n"}]}