[Bps-public-commit] r12384 - in Prophet/branches/luid: lib/Prophet

sartak at bestpractical.com sartak at bestpractical.com
Fri May 16 07:46:59 EDT 2008


Author: sartak
Date: Fri May 16 07:46:59 2008
New Revision: 12384

Modified:
   Prophet/branches/luid/   (props changed)
   Prophet/branches/luid/lib/Prophet/CLI.pm
   Prophet/branches/luid/lib/Prophet/Record.pm

Log:
 r55984 at onn:  sartak | 2008-05-16 07:46:55 -0400
 Allow --luid in the command line


Modified: Prophet/branches/luid/lib/Prophet/CLI.pm
==============================================================================
--- Prophet/branches/luid/lib/Prophet/CLI.pm	(original)
+++ Prophet/branches/luid/lib/Prophet/CLI.pm	Fri May 16 07:46:59 2008
@@ -128,6 +128,11 @@
     if ( my $uuid = delete $self->{args}->{uuid} ) {
         $self->uuid($uuid);
     }
+    elsif ( my $luid = delete $self->{args}->{luid} ) {
+        my $uuid = $self->app_handle->handle->find_uuid_by_luid(luid => $luid);
+        die "Invalid luid '$luid'\n" if !defined($uuid);
+        $self->uuid($uuid);
+    }
     if ( $self->{args}->{type} ) {
         $self->type( delete $self->{args}->{'type'} );
     } elsif($self->primary_commands->[-2]) {

Modified: Prophet/branches/luid/lib/Prophet/Record.pm
==============================================================================
--- Prophet/branches/luid/lib/Prophet/Record.pm	(original)
+++ Prophet/branches/luid/lib/Prophet/Record.pm	Fri May 16 07:46:59 2008
@@ -133,8 +133,9 @@
 }
 
 =head2 load { uuid => $UUID }
+=head2 load { luid => $UUID }
 
-Loads a Prophet record off disk by its uuid.
+Loads a Prophet record off disk by its uuid or luid.
 
 =cut
 



More information about the Bps-public-commit mailing list