line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
692
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use HH::Unispool::Config; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
5
|
use HH::Unispool::Config::OS; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
38
|
|
5
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config::Scope; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
6
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config::Entry::System; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
24
|
|
7
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config::Entry::Device::4; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
8
|
1
|
|
|
1
|
|
7
|
use HH::Unispool::Config::Entry::Device::6; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
235
|
|
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 4 device to _Local_ |
38
|
|
|
|
|
|
|
$dev = HH::Unispool::Config::Entry::Device::4->new( { |
39
|
|
|
|
|
|
|
name => 'lp-pipe', |
40
|
|
|
|
|
|
|
filter_name => 'cat', |
41
|
|
|
|
|
|
|
trailer_name => 'PIPE_PROC', |
42
|
|
|
|
|
|
|
destination_device => 'lp', |
43
|
|
|
|
|
|
|
description => 'lp-pipe', |
44
|
|
|
|
|
|
|
} ); |
45
|
|
|
|
|
|
|
$sysn->add_device($dev); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# Write the configuration |
48
|
|
|
|
|
|
|
$conf->write('t/config.sample.d4.out'); |
49
|
|
|
|
|
|
|
1; |