[open-ils-commits] r7860 - trunk/Open-ILS/src/perlmods/OpenILS/WWW

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Oct 3 14:37:50 EDT 2007


Author: miker
Date: 2007-10-03 14:27:01 -0400 (Wed, 03 Oct 2007)
New Revision: 7860

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
Log:
clean up ids read from file

Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm	2007-10-03 18:18:49 UTC (rev 7859)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm	2007-10-03 18:27:01 UTC (rev 7860)
@@ -65,9 +65,13 @@
 			my $csv = new Text::CSV;
 
 			while (<$file>) {
+				chomp;
 				$csv->parse($_);
 				my @data = $csv->fields;
-				push @records, $data[$col];
+				my $id = $data[$col];
+				$id =~ s/\D+//o;
+				next unless ($id);
+				push @records, $id;
 			}
 		}
 	}



More information about the open-ils-commits mailing list