[Bps-public-commit] r16072 - in Prophet/branches/dispatcher: lib/Prophet/CLI
sartak at bestpractical.com
sartak at bestpractical.com
Thu Sep 25 16:24:40 EDT 2008
Author: sartak
Date: Thu Sep 25 16:24:39 2008
New Revision: 16072
Modified:
Prophet/branches/dispatcher/ (props changed)
Prophet/branches/dispatcher/lib/Prophet/CLI/Dispatcher.pm
Log:
r72479 at onn: sartak | 2008-09-25 16:24:15 -0400
delete 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 16:24:39 2008
@@ -66,6 +66,21 @@
$record->uuid;
};
+on ['delete'] => sub {
+ my $self = shift;
+
+ $self->context->require_uuid;
+ my $record = $self->context->_load_record;
+ my $deleted = $record->delete;
+
+ if ($deleted) {
+ print $record->type . " " . $record->uuid . " deleted.\n";
+ } else {
+ print $record->type . " " . $record->uuid . " could not be deleted.\n";
+ }
+
+};
+
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