line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
758
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use HH::Unispool::Config; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config::OS; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
5
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config::Scope; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
6
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config::Entry::System; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
22
|
|
7
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config::Entry::Device::6; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
22
|
|
8
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config::Entry::Device::7; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
209
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# Create a config from scratch with a _Local_ scope |
11
|
|
|
|
|
|
|
my $conf = HH::Unispool::Config->new( { |
12
|
|
|
|
|
|
|
scope => HH::Unispool::Config::Scope->new ( { |
13
|
|
|
|
|
|
|
scope => [ qw( _Local_) ], |
14
|
|
|
|
|
|
|
} ), |
15
|
|
|
|
|
|
|
} ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Create the _Local_ system and add it to the configuration |
18
|
|
|
|
|
|
|
my $sysn = HH::Unispool::Config::Entry::System->new( { |
19
|
|
|
|
|
|
|
name => '_Local_', |
20
|
|
|
|
|
|
|
local_system_name => 'foo', |
21
|
|
|
|
|
|
|
network_name => 'foo.bar.org', |
22
|
|
|
|
|
|
|
os => HH::Unispool::Config::OS->new( { |
23
|
|
|
|
|
|
|
os => 'Solaris', |
24
|
|
|
|
|
|
|
} ), |
25
|
|
|
|
|
|
|
} ); |
26
|
|
|
|
|
|
|
$conf->add_system($sysn); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# Add a type 6 device to _Local_ |
29
|
|
|
|
|
|
|
my $dev = HH::Unispool::Config::Entry::Device::6->new( { |
30
|
|
|
|
|
|
|
name => 'lp', |
31
|
|
|
|
|
|
|
filter_name => 'cat', |
32
|
|
|
|
|
|
|
remote_node_name => 'lp.foo.bar.org', |
33
|
|
|
|
|
|
|
description => 'lp', |
34
|
|
|
|
|
|
|
} ); |
35
|
|
|
|
|
|
|
$sysn->add_device($dev); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# Add a type 7 device to _Local_ |
38
|
|
|
|
|
|
|
$dev = HH::Unispool::Config::Entry::Device::7->new( { |
39
|
|
|
|
|
|
|
name => 'lp-pipe', |
40
|
|
|
|
|
|
|
filter_name => 'cat', |
41
|
|
|
|
|
|
|
destination_device => 'lp', |
42
|
|
|
|
|
|
|
description => 'lp-pipe', |
43
|
|
|
|
|
|
|
} ); |
44
|
|
|
|
|
|
|
$sysn->add_device($dev); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# Write the configuration |
47
|
|
|
|
|
|
|
$conf->write('t/config.sample.d7.out'); |
48
|
|
|
|
|
|
|
1; |