[Bps-public-commit] r15276 - in Prophet/trunk: . lib/Prophet/CLI/Command

sartak at bestpractical.com sartak at bestpractical.com
Wed Aug 20 05:16:47 EDT 2008


Author: sartak
Date: Wed Aug 20 05:16:13 2008
New Revision: 15276

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/CLI/CollectionCommand.pm
   Prophet/trunk/lib/Prophet/CLI/Command.pm
   Prophet/trunk/lib/Prophet/CLI/Command/Create.pm
   Prophet/trunk/lib/Prophet/CLI/RecordCommand.pm

Log:
 r69844 at onn:  sartak | 2008-08-20 05:15:21 -0400
 Rename _get_record_class to _get_record_object


Modified: Prophet/trunk/lib/Prophet/CLI/CollectionCommand.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/CollectionCommand.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/CollectionCommand.pm	Wed Aug 20 05:16:13 2008
@@ -10,7 +10,7 @@
         type => { default => $self->type },
     });
 
-    my $record_class = $self->_get_record_class(type => $args{type});
+    my $record_class = $self->_get_record_object(type => $args{type});
     my $class = $record_class->collection_class;
     Prophet::App->require($class);
 

Modified: Prophet/trunk/lib/Prophet/CLI/Command.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/Command.pm	Wed Aug 20 05:16:13 2008
@@ -79,7 +79,7 @@
     my %args = @_;
     my $hash = $args{'hash'};
     my @ordering = @{ $args{'ordering'} || [] };
-    my $record = $self->_get_record_class;
+    my $record = $self->_get_record_object;
     my $do_not_edit = $record->can('props_not_to_edit') ? $record->props_not_to_edit : '';
 
     if (@ordering) {

Modified: Prophet/trunk/lib/Prophet/CLI/Command/Create.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command/Create.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/Command/Create.pm	Wed Aug 20 05:16:13 2008
@@ -12,7 +12,7 @@
 
 sub run {
     my $self   = shift;
-    my $record = $self->_get_record_class;
+    my $record = $self->_get_record_object;
     my ($val, $msg) = $record->create( props => $self->edit_props );
     if (!$val) {
         warn "Unable to create record: " . $msg . "\n";

Modified: Prophet/trunk/lib/Prophet/CLI/RecordCommand.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/RecordCommand.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/RecordCommand.pm	Wed Aug 20 05:16:13 2008
@@ -21,7 +21,7 @@
     isa => 'Prophet::Record',
 );
 
-=head2 _get_record_class [{ type => 'type' }]
+=head2 _get_record_object [{ type => 'type' }]
 
 Tries to determine a record class from either the given type argument or
 the current object's C<$type> attribute.
@@ -31,7 +31,7 @@
 
 =cut
 
-sub _get_record_class {
+sub _get_record_object {
     my $self = shift;
     my %args = validate(@_, {
         type => { default => $self->type },
@@ -67,7 +67,7 @@
 
 sub _load_record {
     my $self = shift;
-    my $record = $self->_get_record_class;
+    my $record = $self->_get_record_object;
     $record->load( uuid => $self->uuid )
         || $self->fatal_error("I couldn't find the " . $self->type . ' ' . $self->uuid);
     return $record;



More information about the Bps-public-commit mailing list