X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Frandom_records;h=b700dc19a22ef646d32d262ecb255533a5f29218;hb=5de6112b70b59420b245ce636a8b2e3c90acbe00;hp=f45f942028a7e730067999550747a05068c8733d;hpb=816283f2865cd4249b16f2aeb833b9ebadd0205c;p=biopieces.git diff --git a/bp_bin/random_records b/bp_bin/random_records index f45f942..b700dc1 100755 --- a/bp_bin/random_records +++ b/bp_bin/random_records @@ -1,4 +1,4 @@ -#!/usr/bin/env perl -w +#!/usr/bin/env perl # Copyright (C) 2007-2009 Martin A. Hansen. @@ -26,6 +26,7 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +use warnings; use strict; use Maasha::Biopieces; use Maasha::Filesys; @@ -34,7 +35,7 @@ use Maasha::Filesys; # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -my ( $run_time_beg, $run_time_end, $options, $in, $out, $record, $tmp_dir, $tmp_file, $fh_out, $fh_in, $count, $i, %rand_hash, $rand, $max ); +my ( $options, $in, $out, $record, $tmp_dir, $tmp_file, $fh_out, $fh_in, $count, $i, %rand_hash, $rand, $max ); $options = Maasha::Biopieces::parse_options( [ @@ -96,7 +97,9 @@ while ( $record = Maasha::Biopieces::get_record( $fh_in ) ) close $fh_in; unlink $tmp_file; -Maasha::Filesys::dir_remove( $tmp_dir ); + +Maasha::Biopieces::close_stream( $in ); +Maasha::Biopieces::close_stream( $out ); # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -104,20 +107,13 @@ Maasha::Filesys::dir_remove( $tmp_dir ); BEGIN { - $run_time_beg = Maasha::Biopieces::run_time(); - - Maasha::Biopieces::log_biopiece(); + Maasha::Biopieces::status_set(); } END { - Maasha::Biopieces::close_stream( $in ); - Maasha::Biopieces::close_stream( $out ); - - $run_time_end = Maasha::Biopieces::run_time(); - - Maasha::Biopieces::run_time_print( $run_time_beg, $run_time_end, $options ); + Maasha::Biopieces::status_log(); } @@ -125,4 +121,3 @@ END __END__ -