line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
786
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
84
|
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
9
|
use HH::Unispool::Config; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config::OS; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
5
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config::FilterType; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
6
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config::Entry::Filter; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
7
|
1
|
|
|
1
|
|
5
|
use HH::Unispool::Config::Entry::System; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
39
|
|
8
|
1
|
|
|
1
|
|
7
|
use HH::Unispool::Config::Entry::RemoteSystem::8; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
313
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# Create a config from scratch |
11
|
|
|
|
|
|
|
my $conf3 = HH::Unispool::Config->new(); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# Create a filter and add it to the configuration |
14
|
|
|
|
|
|
|
my $flt = HH::Unispool::Config::Entry::Filter->new( { |
15
|
|
|
|
|
|
|
name => 'cat', |
16
|
|
|
|
|
|
|
file => '/usr/bin/cat', |
17
|
|
|
|
|
|
|
} ); |
18
|
|
|
|
|
|
|
$conf3->add_filter($flt); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Create another filter and add it to the configuration |
21
|
|
|
|
|
|
|
$flt = HH::Unispool::Config::Entry::Filter->new( { |
22
|
|
|
|
|
|
|
name => 'lpcat', |
23
|
|
|
|
|
|
|
file => '/my/bin/dir/lpcat', |
24
|
|
|
|
|
|
|
type => HH::Unispool::Config::FilterType->new( { |
25
|
|
|
|
|
|
|
type => 'lp', |
26
|
|
|
|
|
|
|
} ), |
27
|
|
|
|
|
|
|
} ); |
28
|
|
|
|
|
|
|
$conf3->add_filter($flt); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# Create the _Network_ system and add it to the configuration |
31
|
|
|
|
|
|
|
my $sysn = HH::Unispool::Config::Entry::System->new( { |
32
|
|
|
|
|
|
|
name => '_Network_', |
33
|
|
|
|
|
|
|
} ); |
34
|
|
|
|
|
|
|
$conf3->add_system($sysn); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# Add a type 8 remote system to _Network_ |
37
|
|
|
|
|
|
|
my $rsys = HH::Unispool::Config::Entry::RemoteSystem::8->new( { |
38
|
|
|
|
|
|
|
name => 'foo', |
39
|
|
|
|
|
|
|
os => HH::Unispool::Config::OS->new( { os => 'Solaris' } ), |
40
|
|
|
|
|
|
|
remote_node_name => 'foo.bar.org', |
41
|
|
|
|
|
|
|
} ); |
42
|
|
|
|
|
|
|
$sysn->add_remote_system($rsys); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# Create the foo.bar.org system and add it to the configuration |
45
|
|
|
|
|
|
|
my $sysf = HH::Unispool::Config::Entry::System->new( { |
46
|
|
|
|
|
|
|
name => 'foo.bar.org', |
47
|
|
|
|
|
|
|
local_system_name => 'foo', |
48
|
|
|
|
|
|
|
network_name => 'foo.bar.org', |
49
|
|
|
|
|
|
|
os => HH::Unispool::Config::OS->new( { os => 'Solaris' } ), |
50
|
|
|
|
|
|
|
type => 'cs', |
51
|
|
|
|
|
|
|
} ); |
52
|
|
|
|
|
|
|
$conf3->add_system($sysf); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# Write the configuration |
55
|
|
|
|
|
|
|
$conf3->write('t/config.sample.flt.out'); |
56
|
|
|
|
|
|
|
1; |