qx/mkdir -p $outdir/;
my $x = 0;
- open(FILE, ">>$outfile") or ol_handle_event('OFFLINE_FILE_ERROR');
+ open(FILE, ">>$outfile") or ol_handle_event('OFFLINE_FILE_ERROR', 'outfile' => ">>$outfile");
while( <$handle> ) { print FILE; $x++;}
close(FILE);
sub ol_file_to_perl {
my $fname = shift;
- open(F, "$fname") or ol_handle_event('OFFLINE_FILE_ERROR');
+ open(F, "$fname") or ol_handle_event('OFFLINE_FILE_ERROR', 'fname' => "$fname");
my @d = <F>;
my @p;
push(@p, OpenSRF::Utils::JSON->JSON2perl($_)) for @d;
if(!$rhandle) {
open($rhandle, ">>$basedir/pending/$org/$seskey/results")
- or ol_handle_event('OFFLINE_FILE_ERROR');
+ or ol_handle_event('OFFLINE_FILE_ERROR', 'append_path' => ">>$basedir/pending/$org/$seskey/results");
}
print $rhandle "$obj\n";