[Rt-commit] [svn] r1769 - in DBIx-SearchBuilder/trunk: . SearchBuilder

jesse at pallas.eruditorum.org jesse at pallas.eruditorum.org
Tue Nov 9 23:29:11 EST 2004


Author: jesse
Date: Tue Nov  9 23:29:10 2004
New Revision: 1769

Modified:
   DBIx-SearchBuilder/trunk/   (props changed)
   DBIx-SearchBuilder/trunk/SearchBuilder/Record.pm
Log:
 r8973 at tinbook:  jesse | 2004-11-10T04:29:17.496117Z
 Perltidied Record->Create
 
 


Modified: DBIx-SearchBuilder/trunk/SearchBuilder/Record.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/SearchBuilder/Record.pm	(original)
+++ DBIx-SearchBuilder/trunk/SearchBuilder/Record.pm	Tue Nov  9 23:29:10 2004
@@ -1019,30 +1019,32 @@
 
 *create = \&Create;
 
-sub Create  {
-    my $self = shift;
+sub Create {
+    my $self    = shift;
     my %attribs = @_;
 
     my ($key);
-    foreach $key (keys %attribs) {	
-	my $method = "Validate$key";
-	unless ($self->$method($attribs{$key})) {
-		delete	$attribs{$key};
-	};
+    foreach $key ( keys %attribs ) {
+        my $method = "Validate$key";
+        unless ( $self->$method( $attribs{$key} ) ) {
+            delete $attribs{$key};
+        }
     }
-    unless ($self->_Handle->KnowsBLOBs) {
+    unless ( $self->_Handle->KnowsBLOBs ) {
+
         # Support for databases which don't deal with LOBs automatically
         my $ca = $self->_ClassAccessible();
-        foreach $key (keys %attribs) {
-            if ($ca->{$key}->{'type'} =~ /^(text|longtext|clob|blob|lob)$/i) {
-                my $bhash = $self->_Handle->BLOBParams($key, $ca->{$key}->{'type'});
+        foreach $key ( keys %attribs ) {
+            if ( $ca->{$key}->{'type'} =~ /^(text|longtext|clob|blob|lob)$/i ) {
+                my $bhash =
+                  $self->_Handle->BLOBParams( $key, $ca->{$key}->{'type'} );
                 $bhash->{'value'} = $attribs{$key};
                 $attribs{$key} = $bhash;
             }
         }
     }
-    return ($self->_Handle->Insert($self->Table, %attribs));
-  }
+    return ( $self->_Handle->Insert( $self->Table, %attribs ) );
+}
 
 # }}}
 


More information about the Rt-commit mailing list