[Bps-public-commit] r16079 - in Prophet/branches/dispatcher: lib/Prophet/CLI

sartak at bestpractical.com sartak at bestpractical.com
Thu Sep 25 18:48:15 EDT 2008


Author: sartak
Date: Thu Sep 25 18:48:14 2008
New Revision: 16079

Modified:
   Prophet/branches/dispatcher/   (props changed)
   Prophet/branches/dispatcher/lib/Prophet/CLI/Dispatcher.pm

Log:
 r72495 at onn:  sartak | 2008-09-25 18:23:02 -0400
 show command


Modified: Prophet/branches/dispatcher/lib/Prophet/CLI/Dispatcher.pm
==============================================================================
--- Prophet/branches/dispatcher/lib/Prophet/CLI/Dispatcher.pm	(original)
+++ Prophet/branches/dispatcher/lib/Prophet/CLI/Dispatcher.pm	Thu Sep 25 18:48:14 2008
@@ -96,6 +96,22 @@
     }
 };
 
+on show => sub {
+    my $self = shift;
+
+    $self->context->require_uuid;
+    my $record = $self->context->_load_record;
+
+    print $self->cli->stringify_props(
+        record  => $record,
+        batch   => $self->context->has_arg('batch'),
+        verbose => $self->context->has_arg('verbose'),
+    );
+};
+
+
+# catch-all. () makes sure we don't hit the annoying historical feature of
+# the empty regex meaning the last-used regex
 on qr/()/ => sub {
     my $self = shift;
     $self->fatal_error("The command you ran could not be found. Perhaps running '$0 help' would help?");



More information about the Bps-public-commit mailing list