line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mnet::Opts::Set; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Mnet::Opts::Set - Check for loaded Mnet::Opts::Set pragma sub-modules |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 SYNOPSIS |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Mnet::Opts::Set; |
10
|
|
|
|
|
|
|
$opts = Mnet::Opts::Set::pragmas(); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 DESCRIPTION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
This module can be used to check what Mnet::Opts::Set pragma sub-modules are |
15
|
|
|
|
|
|
|
currently loaded. |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Scripts should not need to use or call this module. Normally scripts would use |
18
|
|
|
|
|
|
|
the L and L modules, which handle checking the |
19
|
|
|
|
|
|
|
status of Mnet::Opts::Set pragma sub-modules. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 FUNCTIONS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Mnet::Opts::Set implements the functions listed below. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# required modules |
28
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
29
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
30
|
1
|
|
|
1
|
|
5
|
use Mnet; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
31
|
1
|
|
|
1
|
|
4
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
303
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub enable { |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# Mnet::Opts::Set::enable($pragma) |
38
|
|
|
|
|
|
|
# purpose: use this function to dynamically load the specified pragma option |
39
|
|
|
|
|
|
|
# $pragma: progma option to enable, such as silent, quiet, etc. |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
0
|
0
|
0
|
0
|
my $pragma = shift // croak("missing pragma arg"); |
42
|
0
|
|
|
|
|
0
|
my $path = $INC{"Mnet/Opts/Set.pm"}; |
43
|
0
|
|
|
|
|
0
|
$path =~ s/(Mnet\/Opts\/Set)\.pm$/$1\//; |
44
|
0
|
|
|
|
|
0
|
$path .= ucfirst($pragma) . ".pm"; |
45
|
0
|
|
|
|
|
0
|
$INC{"Mnet/Opts/Set/".ucfirst($pragma).".pm"} = $path; |
46
|
0
|
|
|
|
|
0
|
return; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub pragmas { |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 Mnet::Opts::Set::pragmas |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
$opts = Mnet::Opts::Set::pragmas() |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This function returns a hash containing true values for any Mnet::Opts::Set |
58
|
|
|
|
|
|
|
pragma sub-modules that have been loaded with the perl 'use' command. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Refer to the SEE ALSO section of this document for a list of these sub-modules. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
# return opts hash with values set for used Mnet::Opts::Set sub-modules |
65
|
16
|
|
|
16
|
1
|
24
|
my $opts = {}; |
66
|
16
|
|
|
|
|
355
|
foreach my $module (keys %INC) { |
67
|
1792
|
50
|
|
|
|
2815
|
next if $module !~ /^Mnet\/Opts\/Set\/(\S+)\.pm$/; |
68
|
0
|
|
|
|
|
0
|
$opts->{lc($1)} = 1; |
69
|
|
|
|
|
|
|
} |
70
|
16
|
|
|
|
|
94
|
return $opts; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 SEE ALSO |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
L |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
L |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
L |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
L |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
L |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
L |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
# normal package return |
92
|
|
|
|
|
|
|
1; |
93
|
|
|
|
|
|
|
|