Author: spadkins
Date: Wed Oct  1 12:12:23 2008
New Revision: 11906

Modified:
   p5ee/trunk/App-Repository/lib/App/Repository.pm

Log:
fixed up for use with Oracle: field_sep in import_rows()

Modified: p5ee/trunk/App-Repository/lib/App/Repository.pm
==============================================================================
--- p5ee/trunk/App-Repository/lib/App/Repository.pm     (original)
+++ p5ee/trunk/App-Repository/lib/App/Repository.pm     Wed Oct  1 12:12:23 2008
@@ -2972,8 +2972,10 @@
     my $field_quote = $options->{field_quote};
     my $field_escape = $options->{field_escape};
 
+    $field_sep = '\|' if ($field_sep eq "|");
+
     open(App::Repository::DBI::FILE, "< $file") || die "Unable to open $file 
for reading: $!";
-    my (@row, $quoted_field_regexp, $field_regexp);
+    my (@row, $quoted_field_regexp, $field_regexp, $count);
     while (<App::Repository::DBI::FILE>) {
         chomp;
         if ($field_quote) {
@@ -2999,10 +3001,12 @@
         }
         # TODO: use insert_rows() instead of insert_row()
         $self->insert_row($table, $columns, [EMAIL PROTECTED]);
+        $count++;
     }
     close(App::Repository::DBI::FILE);
 
-    &App::sub_exit() if ($App::trace);
+    &App::sub_exit($count) if ($App::trace);
+    return($count);
 }
 
 #############################################################################
@@ -4107,6 +4111,7 @@
 =cut
 
 sub _load_rep_metadata_from_source {
+    die "_load_rep_metadata_from_source() must be implemented in a subclass";
     my ($self) = @_;
 }
 

Reply via email to