converted tabs to spaces, removed trailing whitespace
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Row.pm
index 1bdcd58..16745b5 100644 (file)
@@ -10,7 +10,7 @@ __PACKAGE__->load_components(qw/AccessorGroup/);
 
 __PACKAGE__->mk_group_accessors('simple' => 'result_source');
 
-=head1 NAME 
+=head1 NAME
 
 DBIx::Class::Row - Basic row methods
 
@@ -40,7 +40,7 @@ sub new {
       unless ref($attrs) eq 'HASH';
     while (my ($k, $v) = each %$attrs) {
       $new->throw_exception("No such column $k on $class")
-       unless $class->has_column($k);
+        unless $class->has_column($k);
       $new->store_column($k => $v);
     }
   }
@@ -122,8 +122,8 @@ sub update {
 
   $obj->delete
 
-Deletes the object from the database. The object is still perfectly usable, 
-but ->in_storage() will now return 0 and the object must re inserted using 
+Deletes the object from the database. The object is still perfectly usable,
+but ->in_storage() will now return 0 and the object must re inserted using
 ->insert() before ->update() can be used on it.
 
 =cut
@@ -136,8 +136,8 @@ sub delete {
     $self->throw_exception("Cannot safely delete a row in a PK-less table")
       if ! keys %$ident_cond;
     foreach my $column (keys %$ident_cond) {
-           $self->throw_exception("Can't delete the object unless it has loaded the primary keys")
-             unless exists $self->{_column_data}{$column};
+            $self->throw_exception("Can't delete the object unless it has loaded the primary keys")
+              unless exists $self->{_column_data}{$column};
     }
     $self->result_source->storage->delete(
       $self->result_source->from, $ident_cond);
@@ -280,9 +280,9 @@ Sets a column value without marking it as dirty.
 
 sub store_column {
   my ($self, $column, $value) = @_;
-  $self->throw_exception( "No such column '${column}'" ) 
+  $self->throw_exception( "No such column '${column}'" )
     unless exists $self->{_column_data}{$column} || $self->has_column($column);
-  $self->throw_exception( "set_column called for ${column} without value" ) 
+  $self->throw_exception( "set_column called for ${column} without value" )
     if @_ < 3;
   return $self->{_column_data}{$column} = $value;
 }
@@ -312,7 +312,7 @@ sub inflate_result {
     if (ref($pre_val->[0]) eq 'ARRAY') { # multi
       my @pre_objects;
       foreach my $pre_rec (@$pre_val) {
-        unless ($pre_source->primary_columns == grep { exists $pre_rec->[0]{$_} 
+        unless ($pre_source->primary_columns == grep { exists $pre_rec->[0]{$_}
            and defined $pre_rec->[0]{$_} } $pre_source->primary_columns) {
           next;
         }
@@ -322,11 +322,11 @@ sub inflate_result {
       $new->related_resultset($pre)->set_cache(\@pre_objects);
     } elsif (defined $pre_val->[0]) {
       my $fetched;
-      unless ($pre_source->primary_columns == grep { exists $pre_val->[0]{$_} 
+      unless ($pre_source->primary_columns == grep { exists $pre_val->[0]{$_}
          and !defined $pre_val->[0]{$_} } $pre_source->primary_columns)
       {
         $fetched = $pre_source->result_class->inflate_result(
-                      $pre_source, @{$pre_val});      
+                      $pre_source, @{$pre_val});
       }
       my $accessor = $source->relationship_info($pre)->{attrs}{accessor};
       $class->throw_exception("No accessor for prefetched $pre")