[Bps-public-commit] Prophet branch, master, updated. 1e8713280810752d892fb8376d17b316530930ad

clkao at bestpractical.com clkao at bestpractical.com
Wed Apr 15 07:35:01 EDT 2009


The branch, master has been updated
       via  1e8713280810752d892fb8376d17b316530930ad (commit)
      from  eeeea47cffa69a8524f0c4ec0a03110d2f95bf00 (commit)

Summary of changes:
 lib/Prophet/CLI/Command/Info.pm |   21 +++++++++++++++++++++
 lib/Prophet/CLI/Dispatcher.pm   |    1 +
 2 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 lib/Prophet/CLI/Command/Info.pm

- Log -----------------------------------------------------------------
commit 1e8713280810752d892fb8376d17b316530930ad
Author: Chia-liang Kao <clkao at clkao.org>
Date:   Wed Apr 15 19:20:43 2009 +0800

    very basic prophet info command.

diff --git a/lib/Prophet/CLI/Command/Info.pm b/lib/Prophet/CLI/Command/Info.pm
new file mode 100644
index 0000000..bfbe894
--- /dev/null
+++ b/lib/Prophet/CLI/Command/Info.pm
@@ -0,0 +1,21 @@
+package Prophet::CLI::Command::Info;
+use Any::Moose;
+extends 'Prophet::CLI::Command';
+
+sub ARG_TRANSLATIONS { shift->SUPER::ARG_TRANSLATIONS(),  l => 'local' };
+
+sub run {
+    my $self = shift;
+    print "Working on prophet database: ".$self->handle->url.$/;
+
+    print "Known types: ".join(',', @{$self->handle->list_types} ).$/;
+
+}
+
+__PACKAGE__->meta->make_immutable;
+no Any::Moose;
+
+
+
+1;
+
diff --git a/lib/Prophet/CLI/Dispatcher.pm b/lib/Prophet/CLI/Dispatcher.pm
index 99d61d5..cde09a1 100644
--- a/lib/Prophet/CLI/Dispatcher.pm
+++ b/lib/Prophet/CLI/Dispatcher.pm
@@ -61,6 +61,7 @@ on log      => run_command("Log");
 on shell    => run_command("Shell");
 on aliases  => run_command("Aliases");
 on export => run_command('Export');
+on info   => run_command('Info');
 
 on push => sub {
     my $self = shift;

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list