use save_marc
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 23 Oct 2010 11:58:37 +0000 (13:58 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 23 Oct 2010 11:58:37 +0000 (13:58 +0200)
COBISS.pm

index 5611007..c324898 100644 (file)
--- a/COBISS.pm
+++ b/COBISS.pm
@@ -184,14 +184,7 @@ diag "fetch_marc $nr [$id] $format";
                        }
                }
 
-               my $path = "marc/$id.$format";
-
-               open($out, '>:utf8', $path);
-               print $out $marc->as_usmarc;
-               close($out);
-
-               diag "created $path ", -s $path, " bytes";
-
+               $self->save_marc( $id, $marc->as_usmarc );
                diag $marc->as_formatted;
 
                $nr++;