summary refs log tree commit diff
path: root/pbc/compile_pbc.pl
diff options
context:
space:
mode:
Diffstat (limited to 'pbc/compile_pbc.pl')
-rw-r--r--pbc/compile_pbc.pl21
1 files changed, 21 insertions, 0 deletions
diff --git a/pbc/compile_pbc.pl b/pbc/compile_pbc.pl
new file mode 100644
index 0000000..5134cc5
--- /dev/null
+++ b/pbc/compile_pbc.pl
@@ -0,0 +1,21 @@
+#!/bin/env perl
+use 5.01;
+use strict;
+use warnings;
+use Google::ProtocolBuffers;
+
+my $pbc_definition = "pbc/riakclient.proto";
+my $output_file = "lib/Net/Riak/Transport/Message.pm";
+
+say "Compiling Protocol Buffers definition..";
+
+Google::ProtocolBuffers->parsefile(
+    $pbc_definition, {
+        generate_code => $output_file,
+        create_accessors => 1
+    }
+);
+
+say "done.";
+
+exit;