line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Information on device type 0 is obtained through an informal document. |
2
|
|
|
|
|
|
|
# I guess this device type is out of fashion... |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
685
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
8
|
use HH::Unispool::Config; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
7
|
1
|
|
|
1
|
|
5
|
use HH::Unispool::Config::OS; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
8
|
1
|
|
|
1
|
|
7
|
use HH::Unispool::Config::Scope; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
21
|
|
9
|
1
|
|
|
1
|
|
9
|
use HH::Unispool::Config::Entry::System; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
10
|
1
|
|
|
1
|
|
7
|
use HH::Unispool::Config::Entry::Device::0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
173
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# Create a config from scratch with a _Local_ scope |
13
|
|
|
|
|
|
|
my $conf = HH::Unispool::Config->new( { |
14
|
|
|
|
|
|
|
scope => HH::Unispool::Config::Scope->new ( { |
15
|
|
|
|
|
|
|
scope => [ qw( _Local_) ], |
16
|
|
|
|
|
|
|
} ), |
17
|
|
|
|
|
|
|
} ); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# Create the _Local_ system and add it to the configuration |
20
|
|
|
|
|
|
|
my $sysn = HH::Unispool::Config::Entry::System->new( { |
21
|
|
|
|
|
|
|
name => '_Local_', |
22
|
|
|
|
|
|
|
local_system_name => 'foo', |
23
|
|
|
|
|
|
|
network_name => 'foo.bar.org', |
24
|
|
|
|
|
|
|
os => HH::Unispool::Config::OS->new( { |
25
|
|
|
|
|
|
|
os => 'Solaris', |
26
|
|
|
|
|
|
|
} ), |
27
|
|
|
|
|
|
|
} ); |
28
|
|
|
|
|
|
|
$conf->add_system($sysn); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# Add a type 0 device to _Local_ |
31
|
|
|
|
|
|
|
my $dev = HH::Unispool::Config::Entry::Device::0->new( { |
32
|
|
|
|
|
|
|
name => 'lp', |
33
|
|
|
|
|
|
|
filter_name => 'cat', |
34
|
|
|
|
|
|
|
device_file => '/dev/lp0', |
35
|
|
|
|
|
|
|
} ); |
36
|
|
|
|
|
|
|
$sysn->add_device($dev); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Write the configuration |
39
|
|
|
|
|
|
|
$conf->write('t/config.sample.d0.out'); |
40
|
|
|
|
|
|
|
1; |