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

sartak at bestpractical.com sartak at bestpractical.com
Thu Sep 25 16:24:28 EDT 2008


Author: sartak
Date: Thu Sep 25 16:24:27 2008
New Revision: 16071

Removed:
   Prophet/branches/dispatcher/lib/Prophet/CLI/Command/Create.pm
Modified:
   Prophet/branches/dispatcher/   (props changed)
   Prophet/branches/dispatcher/lib/Prophet/CLI/Command.pm
   Prophet/branches/dispatcher/lib/Prophet/CLIContext.pm

Log:
 r72478 at onn:  sartak | 2008-09-25 16:24:07 -0400
 Move require_uuid to CLIContext


Modified: Prophet/branches/dispatcher/lib/Prophet/CLI/Command.pm
==============================================================================
--- Prophet/branches/dispatcher/lib/Prophet/CLI/Command.pm	(original)
+++ Prophet/branches/dispatcher/lib/Prophet/CLI/Command.pm	Thu Sep 25 16:24:27 2008
@@ -34,23 +34,6 @@
     die $reason . "\n";
 }
 
-=head2 require_uuid
-
-Checks to make sure the uuid attribute is set. Prints an error and dies
-if it is not set.
-
-=cut
-
-sub require_uuid {
-    my $self    = shift;
-
-    if (!$self->has_uuid) {
-        my $type = $self->type;
-        my $name = (split /::/, $self->meta->name)[-1];
-        die "\u$type \l$name requires a luid or uuid (use --id to specify).\n";
-    }
-}
-
 __PACKAGE__->meta->make_immutable;
 no Moose;
 

Modified: Prophet/branches/dispatcher/lib/Prophet/CLIContext.pm
==============================================================================
--- Prophet/branches/dispatcher/lib/Prophet/CLIContext.pm	(original)
+++ Prophet/branches/dispatcher/lib/Prophet/CLIContext.pm	Thu Sep 25 16:24:27 2008
@@ -345,6 +345,23 @@
     return 'Prophet::Record';
 }
 
+=head2 require_uuid
+
+Checks to make sure the uuid attribute is set. Prints an error and dies
+if it is not set.
+
+=cut
+
+sub require_uuid {
+    my $self    = shift;
+
+    if (!$self->has_uuid) {
+        my $type = $self->type;
+        my $name = (split /::/, $self->meta->name)[-1];
+        die "This command requires a luid or uuid (use --id to specify).\n";
+    }
+}
+
 __PACKAGE__->meta->make_immutable;
 no Moose;
 



More information about the Bps-public-commit mailing list