OpenCores
URL https://opencores.org/ocsvn/scan_based_serial_communication/scan_based_serial_communication/trunk

Subversion Repositories scan_based_serial_communication

[/] [scan_based_serial_communication/] [trunk/] [deperlify.pl] - Diff between revs 4 and 7

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 4 Rev 7
Line 165... Line 165...
    my $temp_file = `mktemp deperlify.XXXXXXXXX`;
    my $temp_file = `mktemp deperlify.XXXXXXXXX`;
    chomp $temp_file;
    chomp $temp_file;
 
 
    open (BLOCK_CODE, ">" . $temp_file);
    open (BLOCK_CODE, ">" . $temp_file);
    print BLOCK_CODE $text;
    print BLOCK_CODE $text;
 
 
    # run perl on block
    # run perl on block
    $generated_text = `perl $temp_file`;
    $generated_text = `perl $temp_file`;
 
 
    # Stop if there's an error
    # Check for errors in the eval statement
    if ($? != 0) {
    if ($generated_text ne "") {
        die;
 
    }
 
 
 
    `rm $temp_file`;
    `rm $temp_file`;
 
    } else {
 
        print "\n";
 
        print "################################################################################################\n";
 
        print "### Error in deperlify section. Check $temp_file for evaluated perl code ###\n";
 
        print "################################################################################################\n";
 
        print "\n";
 
        exit;
 
    }
 
 
    return $generated_text;
    return $generated_text;
}
}
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2020 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.