[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16654351#comment-16654351 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 closed pull request #1613: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1613 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/compiler/cpp/src/thrift/generate/t_perl_generator.cc b/compiler/cpp/src/thrift/generate/t_perl_generator.cc index 5a308cfea1..8924a76001 100644 --- a/compiler/cpp/src/thrift/generate/t_perl_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_perl_generator.cc @@ -354,7 +354,7 @@ string t_perl_generator::render_const_value(t_type* type, t_const_value* value) } else if (type->is_enum()) { out << value->get_integer(); } else if (type->is_struct() || type->is_xception()) { -out << "new " << perl_namespace(type->get_program()) << type->get_name() << "({" << endl; +out << perl_namespace(type->get_program()) << type->get_name() << "->new({" << endl; indent_up(); const vector& fields = ((t_struct*)type)->get_members(); @@ -546,7 +546,7 @@ void t_perl_generator::generate_perl_struct_reader(ostream& out, t_struct* tstru indent(out) << "$xfer += $input->readStructBegin(\\$fname);" << endl; // Loop over reading in fields - indent(out) << "while (1) " << endl; + indent(out) << "while (1)" << endl; scope_up(out); @@ -758,7 +758,7 @@ void t_perl_generator::generate_service_processor(t_service* tservice) { f_service_ << indent() << "$input->skip(Thrift::TType::STRUCT);" << endl << indent() << "$input->readMessageEnd();" << endl << indent() - << "my $x = new Thrift::TApplicationException('Function '.$fname.' not implemented.', " + << "my $x = Thrift::TApplicationException->new('Function '.$fname.' not implemented.', " "Thrift::TApplicationException::UNKNOWN_METHOD);" << endl << indent() << "$output->writeMessageBegin($fname, Thrift::TMessageType::EXCEPTION, $rseqid);" << endl << indent() << "$x->write($output);" << endl << indent() @@ -798,7 +798,7 @@ void t_perl_generator::generate_process_function(t_service* tservice, t_function string resultname = perl_namespace(tservice->get_program()) + service_name_ + "_" + tfunction->get_name() + "_result"; - f_service_ << indent() << "my $args = new " << argsname << "();" << endl << indent() + f_service_ << indent() << "my $args = " << argsname << "->new();" << endl << indent() << "$args->read($input);" << endl; f_service_ << indent() << "$input->readMessageEnd();" << endl; @@ -809,7 +809,7 @@ void t_perl_generator::generate_process_function(t_service* tservice, t_function // Declare result for non oneway function if (!tfunction->is_oneway()) { -f_service_ << indent() << "my $result = new " << resultname << "();" << endl; +f_service_ << indent() << "my $result = " << resultname << "->new();" << endl; } // Try block for a function with exceptions @@ -858,7 +858,7 @@ void t_perl_generator::generate_process_function(t_service* tservice, t_function f_service_ << indent() << "if ($@) {" << endl; indent_up(); f_service_ << indent() << "$@ =~ s/^\\s+|\\s+$//g;" << endl - << indent() << "my $err = new Thrift::TApplicationException(\"Unexpected Exception: \" . $@, Thrift::TApplicationException::INTERNAL_ERROR);" << endl + << indent() << "my $err = Thrift::TApplicationException->new(\"Unexpected Exception: \" . $@, Thrift::TApplicationException::INTERNAL_ERROR);" << endl << indent() << "$output->writeMessageBegin('" << tfunction->get_name() << "', Thrift::TMessageType::EXCEPTION, $seqid);" << endl << indent() << "$err->write($output);" << endl << indent() << "$output->writeMessageEnd();" << endl @@ -1106,7 +1106,7 @@ void t_perl_generator::generate_service_client(t_service* tservice) { << "', " << ((*f_iter)->is_oneway() ? "Thrift::TMessageType::ONEWAY" : "Thrift::TMessageType::CALL") << ", $self->{seqid});" << endl; -f_service_ << indent() << "my $args = new " << argsname << "();" << endl; +f_service_ << indent() << "my $args = " << argsname << "->new();" << endl; for (fld_iter = fields.begin(); fld_iter != fields.end(); ++fld_iter) { f_service_ << indent() << "$args->{" << (*fld_iter)->get_name() << "} = $" @@ -1140,12 +1140,12 @@ void t_perl_generator::generate_service_client(t_service* tservice) { f_service_ << indent() <<
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16654175#comment-16654175 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on issue #1613: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1613#issuecomment-430788089 From appveyor: ``` Downloading JDK from http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-windows-x64.exe ERROR: Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found." The install of jdk8 was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\jdk8\tools\chocolateyInstall.ps1'. See log for details. Chocolatey installed 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). ``` Nothing to do with perl This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Assignee: James E. King III >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16654172#comment-16654172 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on issue #1613: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1613#issuecomment-430787717 i havent introduced anything that would break perl 5.10 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Assignee: James E. King III >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16653990#comment-16653990 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on issue #1613: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1613#issuecomment-430734501 One final question - what perl versions will this syntax be compatible with? We currently support 5.10.0 or later. Does this PR change that? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Assignee: James E. King III >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16653537#comment-16653537 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on issue #1613: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1613#issuecomment-430625536 Thanks for resubmitting. Looks like appveyor is having problems... I am looking into it. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16653367#comment-16653367 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-430585658 Fixed and sent on https://github.com/apache/thrift/pull/1613 The issue was print and printf both have lists as arguments - but mixing them up goes poorly This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16653365#comment-16653365 ] ASF GitHub Bot commented on THRIFT-4382: djzort opened a new pull request #1613: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1613 Some helpful tips for a successful Apache Thrift PR: * Did you test your changes locally or using CI in your fork? * Is the Apache Jira THRIFT ticket identifier in the PR title? * Is the Apache Jira THRIFT ticket identifier in the commit message? * Did you squash your changes to a single commit? * Are these changes backwards compatible? (please say so in PR description) * Do you need to update the language-specific README? Example ideal pull request title: THRIFT-: an example pull request title Example ideal commit message: THRIFT-: [summary of fix, one line if possible] Client: [language(s) affected, comma separated, use lib/ directory names please] For more information about committing, see CONTRIBUTING.md Using Indirect Object Syntax to instantiate objects is not recommended as per https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods I have update the output to follow the recommended Class->new() syntax See also https://github.com/apache/thrift/pull/1261 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16647883#comment-16647883 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-429315010 I am going to have to dissect it anyway, as for the life of me i cant see whats breaking the tests. Test test suite is decidedly non-perlish and i cant actually get it to run on a local machine - so i am having to rely on travis (etc) for feedback :( This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16647805#comment-16647805 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-429298290 How bizarre. I rebased on master like I did last time and it automatically closed it. Please open another PR. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16647804#comment-16647804 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 closed pull request #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16631786#comment-16631786 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-425423925 > I rebased on master which passes CI (sometimes with a little help, but it passes). Sorry I have been snowed under and unable to look at this more. But am looking at it now having been inspired by your comment. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16631758#comment-16631758 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-425415823 I rebased on master which passes CI (sometimes with a little help, but it passes). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16478851#comment-16478851 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-389819075 In looking through which TestServer.pl isnt working right in tests, i couldnt help noticing someone didnt know how to take a list and join it in to a string with commas. So I simplified that mess. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16476630#comment-16476630 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-389350814 Woops. Sorry for wasting your time. I have just pushed yet again. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16476074#comment-16476074 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-389224997 ``` root@31d4b8941d65:/thrift/src# git diff HEAD diff --git a/test/perl/TestServer.pl b/test/perl/TestServer.pl index 7f76060a..7257241e 100644 --- a/test/perl/TestServer.pl +++ b/test/perl/TestServer.pl @@ -99,8 +99,8 @@ if ($opts{ssl} and not defined $opts{cert}) { exit 1; } -my $handler= ThriftTest::ThriftTestHandler->new(); -my $handler2 = ThriftTest::SecondServiceHandler->new(); +my $handler= ThriftTestHandler->new(); +my $handler2 = SecondServiceHandler->new(); my $processor = ThriftTest::ThriftTestProcessor->new($handler); my $processor2 = ThriftTest::SecondServiceProcessor->new($handler2); ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16476029#comment-16476029 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-389214229 Still broken - don't need ThriftTest:: on the lines you changed Can't locate object method "new" via package "ThriftTest::ThriftTestHandler" (perhaps you forgot to load "ThriftTest::ThriftTestHandler"?) at TestServer.pl line 102. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16475853#comment-16475853 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on a change in pull request #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#discussion_r188291078 ## File path: test/perl/TestServer.pl ## @@ -99,53 +99,59 @@ sub usage { exit 1; } -my $handler = new ThriftTestHandler(); -my $handler2 = new SecondServiceHandler(); -my $processor = new ThriftTest::ThriftTestProcessor($handler); -my $processor2 = new ThriftTest::SecondServiceProcessor($handler2); +my $handler= ThriftTestHandler->new(); +my $handler2 = SecondServiceHandler()->new; +my $processor = ThriftTest::ThriftTestProcessor->new($handler); +my $processor2 = ThriftTest::SecondServiceProcessor->new($handler2); + my $serversocket; -if ($opts{"domain-socket"}) { -unlink($opts{"domain-socket"}); -$serversocket = new Thrift::UnixServerSocket($opts{"domain-socket"}); -} elsif ($opts{ssl}) { -$serversocket = new Thrift::SSLServerSocket(\%opts); -} else { -$serversocket = new Thrift::ServerSocket(\%opts); +if ($opts{'domain-socket'}) { +unlink($opts{'domain-socket'}); +$serversocket = Thrift::UnixServerSocket->new($opts{'domain-socket'}); +} +elsif ($opts{ssl}) { +$serversocket = Thrift::SSLServerSocket->new(\%opts); +} +else { +$serversocket = Thrift::ServerSocket->new(\%opts); } my $transport; if ($opts{transport} eq 'buffered') { -$transport = new Thrift::BufferedTransportFactory(); -} elsif ($opts{transport} eq 'framed') { -$transport = new Thrift::FramedTransportFactory(); -} else { +$transport = Thrift::BufferedTransportFactory(); +} +elsif ($opts{transport} eq 'framed') { +$transport = Thrift::FramedTransportFactory(); Review comment: I have just corrected this, and force pushed the updated commit This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16475850#comment-16475850 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on a change in pull request #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#discussion_r188290880 ## File path: test/perl/TestServer.pl ## @@ -99,53 +99,59 @@ sub usage { exit 1; } -my $handler = new ThriftTestHandler(); -my $handler2 = new SecondServiceHandler(); -my $processor = new ThriftTest::ThriftTestProcessor($handler); -my $processor2 = new ThriftTest::SecondServiceProcessor($handler2); +my $handler= ThriftTestHandler->new(); +my $handler2 = SecondServiceHandler()->new; +my $processor = ThriftTest::ThriftTestProcessor->new($handler); +my $processor2 = ThriftTest::SecondServiceProcessor->new($handler2); + my $serversocket; -if ($opts{"domain-socket"}) { -unlink($opts{"domain-socket"}); -$serversocket = new Thrift::UnixServerSocket($opts{"domain-socket"}); -} elsif ($opts{ssl}) { -$serversocket = new Thrift::SSLServerSocket(\%opts); -} else { -$serversocket = new Thrift::ServerSocket(\%opts); +if ($opts{'domain-socket'}) { +unlink($opts{'domain-socket'}); +$serversocket = Thrift::UnixServerSocket->new($opts{'domain-socket'}); +} +elsif ($opts{ssl}) { +$serversocket = Thrift::SSLServerSocket->new(\%opts); +} +else { +$serversocket = Thrift::ServerSocket->new(\%opts); } my $transport; if ($opts{transport} eq 'buffered') { -$transport = new Thrift::BufferedTransportFactory(); -} elsif ($opts{transport} eq 'framed') { -$transport = new Thrift::FramedTransportFactory(); -} else { +$transport = Thrift::BufferedTransportFactory(); Review comment: I have just corrected this, and force pushed the updated commit This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474558#comment-16474558 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-388909938 After fixing those lines the feature test passes, so if you can fix that up we'll see how the build goes. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474556#comment-16474556 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on a change in pull request #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#discussion_r188045791 ## File path: test/perl/TestServer.pl ## @@ -99,53 +99,59 @@ sub usage { exit 1; } -my $handler = new ThriftTestHandler(); -my $handler2 = new SecondServiceHandler(); -my $processor = new ThriftTest::ThriftTestProcessor($handler); -my $processor2 = new ThriftTest::SecondServiceProcessor($handler2); +my $handler= ThriftTestHandler->new(); +my $handler2 = SecondServiceHandler()->new; +my $processor = ThriftTest::ThriftTestProcessor->new($handler); +my $processor2 = ThriftTest::SecondServiceProcessor->new($handler2); + my $serversocket; -if ($opts{"domain-socket"}) { -unlink($opts{"domain-socket"}); -$serversocket = new Thrift::UnixServerSocket($opts{"domain-socket"}); -} elsif ($opts{ssl}) { -$serversocket = new Thrift::SSLServerSocket(\%opts); -} else { -$serversocket = new Thrift::ServerSocket(\%opts); +if ($opts{'domain-socket'}) { +unlink($opts{'domain-socket'}); +$serversocket = Thrift::UnixServerSocket->new($opts{'domain-socket'}); +} +elsif ($opts{ssl}) { +$serversocket = Thrift::SSLServerSocket->new(\%opts); +} +else { +$serversocket = Thrift::ServerSocket->new(\%opts); } my $transport; if ($opts{transport} eq 'buffered') { -$transport = new Thrift::BufferedTransportFactory(); -} elsif ($opts{transport} eq 'framed') { -$transport = new Thrift::FramedTransportFactory(); -} else { +$transport = Thrift::BufferedTransportFactory(); Review comment: missing ->new() This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474557#comment-16474557 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on a change in pull request #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#discussion_r188045822 ## File path: test/perl/TestServer.pl ## @@ -99,53 +99,59 @@ sub usage { exit 1; } -my $handler = new ThriftTestHandler(); -my $handler2 = new SecondServiceHandler(); -my $processor = new ThriftTest::ThriftTestProcessor($handler); -my $processor2 = new ThriftTest::SecondServiceProcessor($handler2); +my $handler= ThriftTestHandler->new(); +my $handler2 = SecondServiceHandler()->new; +my $processor = ThriftTest::ThriftTestProcessor->new($handler); +my $processor2 = ThriftTest::SecondServiceProcessor->new($handler2); + my $serversocket; -if ($opts{"domain-socket"}) { -unlink($opts{"domain-socket"}); -$serversocket = new Thrift::UnixServerSocket($opts{"domain-socket"}); -} elsif ($opts{ssl}) { -$serversocket = new Thrift::SSLServerSocket(\%opts); -} else { -$serversocket = new Thrift::ServerSocket(\%opts); +if ($opts{'domain-socket'}) { +unlink($opts{'domain-socket'}); +$serversocket = Thrift::UnixServerSocket->new($opts{'domain-socket'}); +} +elsif ($opts{ssl}) { +$serversocket = Thrift::SSLServerSocket->new(\%opts); +} +else { +$serversocket = Thrift::ServerSocket->new(\%opts); } my $transport; if ($opts{transport} eq 'buffered') { -$transport = new Thrift::BufferedTransportFactory(); -} elsif ($opts{transport} eq 'framed') { -$transport = new Thrift::FramedTransportFactory(); -} else { +$transport = Thrift::BufferedTransportFactory(); +} +elsif ($opts{transport} eq 'framed') { +$transport = Thrift::FramedTransportFactory(); Review comment: missing ->new() This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474548#comment-16474548 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on a change in pull request #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#discussion_r188045268 ## File path: test/perl/TestServer.pl ## @@ -99,53 +99,59 @@ sub usage { exit 1; } -my $handler = new ThriftTestHandler(); -my $handler2 = new SecondServiceHandler(); -my $processor = new ThriftTest::ThriftTestProcessor($handler); -my $processor2 = new ThriftTest::SecondServiceProcessor($handler2); +my $handler= ThriftTestHandler->new(); +my $handler2 = SecondServiceHandler()->new; Review comment: This line is incorrect and causing the cross test feature failure. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474365#comment-16474365 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-388860771 The feature test failed on perl tls/ssl which likely means some logic changed or there is a syntax error. I am taking a look locally. From https://api.travis-ci.org/v3/job/362963723/log.txt: ``` /usr/bin/python3 test/test.py --retry-count 5 --features .* --skip-known-failures --server cpp,c_glib,cl,d,java,csharp,py,py3,rb,hs,perl,php,go,nodejs,dart,erl,lua,rs,netcore === *** Following 2 failures were unexpected ***: If it is introduced by you, please fix it before submitting the code. === server-client: protocol: transport: result: perl-tlsmulti-binary buffered-ip-ssl failure(64) perl-tlsbinarybuffered-ip-ssl failure(64) === ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474359#comment-16474359 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on a change in pull request #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#discussion_r187996643 ## File path: test/perl/TestServer.pl ## @@ -48,7 +48,7 @@ $|++; sub usage { -print <Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474360#comment-16474360 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on a change in pull request #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#discussion_r187996705 ## File path: test/perl/TestServer.pl ## @@ -376,19 +382,21 @@ () my $arg5 = shift; print("testMulti()\n"); - return new ThriftTest::Xtruct({string_thing => "Hello2", byte_thing => $arg0, i32_thing => $arg1, i64_thing => $arg2}); + return ThriftTest::Xtruct->new({string_thing => "Hello2", byte_thing => $arg0, i32_thing => $arg1, i64_thing => $arg2}); } sub testException() { my $self = shift; my $arg = shift; print("testException($arg)\n"); - if ($arg eq "Xception") { -die new ThriftTest::Xception({errorCode => 1001, message => $arg}); - } elsif ($arg eq "TException") { -die "astring"; # all unhandled exceptions become TExceptions - } else { -return new ThriftTest::Xtruct({string_thing => $arg}); + if ($arg eq 'Xception') { Review comment: Okay, fair enough. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474227#comment-16474227 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on a change in pull request #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#discussion_r187952989 ## File path: test/perl/TestServer.pl ## @@ -376,19 +382,21 @@ () my $arg5 = shift; print("testMulti()\n"); - return new ThriftTest::Xtruct({string_thing => "Hello2", byte_thing => $arg0, i32_thing => $arg1, i64_thing => $arg2}); + return ThriftTest::Xtruct->new({string_thing => "Hello2", byte_thing => $arg0, i32_thing => $arg1, i64_thing => $arg2}); } sub testException() { my $self = shift; my $arg = shift; print("testException($arg)\n"); - if ($arg eq "Xception") { -die new ThriftTest::Xception({errorCode => 1001, message => $arg}); - } elsif ($arg eq "TException") { -die "astring"; # all unhandled exceptions become TExceptions - } else { -return new ThriftTest::Xtruct({string_thing => $arg}); + if ($arg eq 'Xception') { Review comment: With eliminating useless interpolations of strings and swapping to postfix new's, I wanted to go the whole way and swap to vaguely Stroustrup style (K w/o Cuddling the else) which is arguably the most common style in perl This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474200#comment-16474200 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on a change in pull request #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#discussion_r187950898 ## File path: test/perl/TestServer.pl ## @@ -48,7 +48,7 @@ $|++; sub usage { -print <Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474194#comment-16474194 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on a change in pull request #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#discussion_r187947528 ## File path: test/perl/TestServer.pl ## @@ -48,7 +48,7 @@ $|++; sub usage { -print <Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474195#comment-16474195 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on a change in pull request #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#discussion_r187948194 ## File path: test/perl/TestServer.pl ## @@ -376,19 +382,21 @@ () my $arg5 = shift; print("testMulti()\n"); - return new ThriftTest::Xtruct({string_thing => "Hello2", byte_thing => $arg0, i32_thing => $arg1, i64_thing => $arg2}); + return ThriftTest::Xtruct->new({string_thing => "Hello2", byte_thing => $arg0, i32_thing => $arg1, i64_thing => $arg2}); } sub testException() { my $self = shift; my $arg = shift; print("testException($arg)\n"); - if ($arg eq "Xception") { -die new ThriftTest::Xception({errorCode => 1001, message => $arg}); - } elsif ($arg eq "TException") { -die "astring"; # all unhandled exceptions become TExceptions - } else { -return new ThriftTest::Xtruct({string_thing => $arg}); + if ($arg eq 'Xception') { Review comment: Not sure these indentation changes are necessary, I prefer the previous way. Is there a canonical perl style guide that reflects this? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474180#comment-16474180 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-388811709 Hopefully it an be merged. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16474174#comment-16474174 ] ASF GitHub Bot commented on THRIFT-4382: jeking3 commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-388810848 There isn't a dedicated perl maintainer for Thrift. I have probably done most of the work recently in there. Recent changes include better CPAN support, cross-test enhancements for multiplexed and graceful shutdown, namespaces and versioning related changes. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16427996#comment-16427996 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-379156049 Out of curiosity is there a 'maintainer' for the perl stuff? The coding style seems a little dated and has a non-perlish feel to the use of sigils (being pedantic) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16427995#comment-16427995 ] ASF GitHub Bot commented on THRIFT-4382: djzort commented on issue #1261: THRIFT-4382: Replace the use of Indirect Object Syntax calls to new() URL: https://github.com/apache/thrift/pull/1261#issuecomment-379155665 I've rebased, made further adjustments including to the examples, and repushed. CI is now running - lets see how it goes This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16397877#comment-16397877 ] ASF GitHub Bot commented on THRIFT-4382: Github user djzort commented on the issue: https://github.com/apache/thrift/pull/1261 it's still on my TODO list, but is very low. I will get to it sooner or later. > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16397001#comment-16397001 ] ASF GitHub Bot commented on THRIFT-4382: Github user jeking3 commented on the issue: https://github.com/apache/thrift/pull/1261 If you are able to finish this up and do the tutorial code, or if you are not able to complete this, please let me know. > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16284289#comment-16284289 ] ASF GitHub Bot commented on THRIFT-4382: Github user bforbis commented on the issue: https://github.com/apache/thrift/pull/1261 It would probably be a good idea to also update the code at `tutorial/perl/*` so that the main perl tutorial uses this preferred syntax. > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (THRIFT-4382) Replace the use of Perl Indirect Object Syntax calls to new()
[ https://issues.apache.org/jira/browse/THRIFT-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16247287#comment-16247287 ] ASF GitHub Bot commented on THRIFT-4382: Github user djzort commented on the issue: https://github.com/apache/thrift/pull/1261 This should now comply with the contributors policy > Replace the use of Perl Indirect Object Syntax calls to new() > -- > > Key: THRIFT-4382 > URL: https://issues.apache.org/jira/browse/THRIFT-4382 > Project: Thrift > Issue Type: Improvement > Components: Perl - Compiler >Reporter: Dean Hamstead >Priority: Minor > > Using Indirect Object Syntax to instantiate objects is not recommended as per > https://perldoc.perl.org/perlobj.html#Invoking-Class-Methods -- This message was sent by Atlassian JIRA (v6.4.14#64029)