Upgrading dependencies to gorealis v2 and thrift 0.12.0
This commit is contained in:
parent
7cbbea498b
commit
54b8d7942a
1327 changed files with 137391 additions and 61476 deletions
12
vendor/git.apache.org/thrift.git/tutorial/perl/PerlClient.pl
generated
vendored
12
vendor/git.apache.org/thrift.git/tutorial/perl/PerlClient.pl
generated
vendored
|
@ -37,10 +37,10 @@ use tutorial::Types;
|
|||
|
||||
use Data::Dumper;
|
||||
|
||||
my $socket = new Thrift::Socket('localhost',9090);
|
||||
my $transport = new Thrift::BufferedTransport($socket,1024,1024);
|
||||
my $protocol = new Thrift::BinaryProtocol($transport);
|
||||
my $client = new tutorial::CalculatorClient($protocol);
|
||||
my $socket = Thrift::Socket->new('localhost',9090);
|
||||
my $transport = Thrift::BufferedTransport->new($socket,1024,1024);
|
||||
my $protocol = Thrift::BinaryProtocol->new($transport);
|
||||
my $client = tutorial::CalculatorClient->new($protocol);
|
||||
|
||||
|
||||
eval{
|
||||
|
@ -53,7 +53,7 @@ eval{
|
|||
my $sum = $client->add(1,1);
|
||||
print "1+1=$sum\n";
|
||||
|
||||
my $work = new tutorial::Work();
|
||||
my $work = tutorial::Work->new();
|
||||
|
||||
$work->op(tutorial::Operation::DIVIDE);
|
||||
$work->num1(1);
|
||||
|
@ -63,7 +63,7 @@ eval{
|
|||
$client->calculate(1, $work);
|
||||
print "Whoa! We can divide by zero?\n";
|
||||
}; if($@) {
|
||||
warn "InvalidOperation: ".Dumper($@);
|
||||
warn 'InvalidOperation: '.Dumper($@);
|
||||
}
|
||||
|
||||
$work->op(tutorial::Operation::SUBTRACT);
|
||||
|
|
16
vendor/git.apache.org/thrift.git/tutorial/perl/PerlServer.pl
generated
vendored
16
vendor/git.apache.org/thrift.git/tutorial/perl/PerlServer.pl
generated
vendored
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
|
@ -67,20 +67,20 @@ sub calculate
|
|||
} elsif ($op == tutorial::Operation::DIVIDE) {
|
||||
if ($num2 == 0)
|
||||
{
|
||||
my $x = new tutorial::InvalidOperation;
|
||||
my $x = tutorial::InvalidOperation->new();
|
||||
$x->whatOp($op);
|
||||
$x->why('Cannot divide by 0');
|
||||
die $x;
|
||||
}
|
||||
$val = $num1 / $num2;
|
||||
} else {
|
||||
my $x = new tutorial::InvalidOperation;
|
||||
my $x = tutorial::InvalidOperation->new();
|
||||
$x->whatOp($op);
|
||||
$x->why('Invalid operation');
|
||||
die $x;
|
||||
}
|
||||
|
||||
my $log = new shared::SharedStruct;
|
||||
my $log = shared::SharedStruct->new();
|
||||
$log->key($logid);
|
||||
$log->value(int($val));
|
||||
$self->{log}->{$logid} = $log;
|
||||
|
@ -104,10 +104,10 @@ sub zip
|
|||
|
||||
|
||||
eval {
|
||||
my $handler = new CalculatorHandler;
|
||||
my $processor = new tutorial::CalculatorProcessor($handler);
|
||||
my $serversocket = new Thrift::ServerSocket(9090);
|
||||
my $forkingserver = new Thrift::ForkingServer($processor, $serversocket);
|
||||
my $handler = CalculatorHandler->new();
|
||||
my $processor = tutorial::CalculatorProcessor->new($handler);
|
||||
my $serversocket = Thrift::ServerSocket->new(9090);
|
||||
my $forkingserver = Thrift::ForkingServer->new($processor, $serversocket);
|
||||
print "Starting the server...\n";
|
||||
$forkingserver->serve();
|
||||
print "done.\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue