| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# Revision History: |
|
4
|
|
|
|
|
|
|
# |
|
5
|
|
|
|
|
|
|
# 26-Nov-2002 Dick Munroe (munroe@csworks.com) |
|
6
|
|
|
|
|
|
|
# Initial Version Created. |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# 03-Dec-2002 Dick Munroe (munroe@csworks.com) |
|
9
|
|
|
|
|
|
|
# Add an allocate only method, _new, which will, if |
|
10
|
|
|
|
|
|
|
# necessary, clone an object. |
|
11
|
|
|
|
|
|
|
# Add a _clone interface. |
|
12
|
|
|
|
|
|
|
# |
|
13
|
|
|
|
|
|
|
# 18-May-2003 Dick Munroe (munroe@csworks.com) |
|
14
|
|
|
|
|
|
|
# Make sure package variables don't leak. |
|
15
|
|
|
|
|
|
|
# |
|
16
|
|
|
|
|
|
|
# 19-May-2003 Dick Munroe (munroe@csworks.com) |
|
17
|
|
|
|
|
|
|
# Use Carp. |
|
18
|
|
|
|
|
|
|
# Isolate kif related classes in a KIF namespace. |
|
19
|
|
|
|
|
|
|
# |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
package KIF::Bootloader ; |
|
22
|
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
5967
|
use vars qw($VERSION @ISA) ; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
78
|
|
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
our $VERSION = "1.03" ; |
|
26
|
|
|
|
|
|
|
our @ISA = qw( |
|
27
|
|
|
|
|
|
|
) ; |
|
28
|
|
|
|
|
|
|
|
|
29
|
1
|
|
|
1
|
|
4
|
use strict ; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
37
|
|
|
30
|
|
|
|
|
|
|
|
|
31
|
1
|
|
|
1
|
|
4
|
use Carp ; |
|
|
1
|
|
|
|
|
6
|
|
|
|
1
|
|
|
|
|
69
|
|
|
32
|
1
|
|
|
1
|
|
790
|
use FileHandle ; |
|
|
1
|
|
|
|
|
12511
|
|
|
|
1
|
|
|
|
|
6
|
|
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub _clone |
|
35
|
|
|
|
|
|
|
{ |
|
36
|
0
|
|
|
0
|
|
|
my ($theObject, $theSource) = @_ ; |
|
37
|
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
foreach (keys %{$theSource}) |
|
|
0
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
{ |
|
40
|
0
|
|
|
|
|
|
$theObject->{$_} = $theSource->{$_} ; |
|
41
|
|
|
|
|
|
|
} ; |
|
42
|
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
return $theObject ; |
|
44
|
|
|
|
|
|
|
} ; |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _new |
|
47
|
|
|
|
|
|
|
{ |
|
48
|
0
|
|
|
0
|
|
|
my $thePackage = shift ; |
|
49
|
|
|
|
|
|
|
|
|
50
|
0
|
|
0
|
|
|
|
my $theClass = ref($thePackage) || $thePackage ; |
|
51
|
0
|
|
0
|
|
|
|
my $theParent = ref($thePackage) && $thePackage ; |
|
52
|
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
my $theObject = bless |
|
54
|
|
|
|
|
|
|
{ |
|
55
|
|
|
|
|
|
|
'filename' => undef |
|
56
|
|
|
|
|
|
|
}, $theClass ; |
|
57
|
|
|
|
|
|
|
|
|
58
|
0
|
0
|
|
|
|
|
if ($theParent) |
|
59
|
|
|
|
|
|
|
{ |
|
60
|
0
|
|
|
|
|
|
$theObject->_clone($theParent) ; |
|
61
|
|
|
|
|
|
|
} ; |
|
62
|
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
return $theObject ; |
|
64
|
|
|
|
|
|
|
} ; |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub new |
|
67
|
|
|
|
|
|
|
{ |
|
68
|
0
|
|
|
0
|
0
|
|
my $thePackage = shift ; |
|
69
|
|
|
|
|
|
|
|
|
70
|
0
|
|
|
|
|
|
return $thePackage->_new() ; |
|
71
|
|
|
|
|
|
|
} ; |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub _file |
|
74
|
|
|
|
|
|
|
{ |
|
75
|
|
|
|
|
|
|
|
|
76
|
0
|
|
|
0
|
|
|
my $theObject = shift ; |
|
77
|
0
|
|
|
|
|
|
my $theFileName = shift ; |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
# |
|
80
|
|
|
|
|
|
|
# Read a file and return the contents as a string. |
|
81
|
|
|
|
|
|
|
# |
|
82
|
|
|
|
|
|
|
|
|
83
|
0
|
0
|
|
|
|
|
my $theFileHandle = new FileHandle "< $theFileName" or croak "Can't open $theFileName" ; |
|
84
|
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
return eval { my @theFile = $theFileHandle->getlines ; join '',@theFile } ; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
} ; |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub filename |
|
89
|
|
|
|
|
|
|
{ |
|
90
|
0
|
|
|
0
|
0
|
|
my $theObject = shift ; |
|
91
|
|
|
|
|
|
|
|
|
92
|
0
|
0
|
|
|
|
|
$theObject->{'filename'} = $_[0] if (@_) ; |
|
93
|
|
|
|
|
|
|
|
|
94
|
0
|
|
|
|
|
|
return $theObject->{'filename'} ; |
|
95
|
|
|
|
|
|
|
} ; |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
sub initrdFile |
|
98
|
|
|
|
|
|
|
{ |
|
99
|
0
|
|
|
0
|
0
|
|
return undef ; |
|
100
|
|
|
|
|
|
|
} ; |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub modify |
|
103
|
0
|
|
|
0
|
0
|
|
{ |
|
104
|
|
|
|
|
|
|
} ; |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub validate |
|
107
|
0
|
|
|
0
|
0
|
|
{ |
|
108
|
|
|
|
|
|
|
} ; |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
1; |