blib/lib/Perlilog/siteclasses/silos.pl untested

filter: Statementstmt 0.0% 0 / 15 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 24 CC 1 SCAR 6.9
CC
1
Cov
0%
who
2.0
makesilosfile
2.0
CRAP 2.0
1 #
2 # This file is part of the Perlilog project.
3 #
4 # Copyright (C) 2003, Eli Billauer
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #
20 # A copy of the license can be found in a file named "licence.txt", at the
21 # root directory of this project.
22 #
23  
24 sub who {
25 my $self = shift;
26 return "Silos Obj. \'".$self->get('name')."\'";
27 }
28  
29 sub makesilosfile {
30 my $self = shift;
31 my $g = $self->globalobj();
32  
33 my $dir=$g->get('filesdir');
34  
35 open (FILE, ">$dir/perlilog.spj") ||
36 blow("Failed to open project file $dir/perlilog.spj\n");
37  
38 print FILE "[Files]\n";
39 my $i=0;
40 my $f;
41 foreach ($g->get('verilogfiles')) {
42 ($f)=/.*?([^\/]*)$/;
43 print FILE "$i=$f\n";
44 $i++;
45 }
46 print FILE "\n[Settings]\nMode=Debug\n";
47 close FILE;
48 }
49