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
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
64
|
|
29
|
2
|
|
|
2
|
|
9
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
34
|
|
30
|
2
|
|
|
2
|
|
9
|
use Carp; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
567
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub enable { |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# Mnet::Opts::Set::enable($pragma) |
37
|
|
|
|
|
|
|
# purpose: use this function to dynamically load the specified pragma option |
38
|
|
|
|
|
|
|
# $pragma: progma option to enable, such as silent, quiet, etc. |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
0
|
0
|
0
|
0
|
my $pragma = shift // croak("missing pragma arg"); |
41
|
0
|
|
|
|
|
0
|
my $path = $INC{"Mnet/Opts/Set.pm"}; |
42
|
0
|
|
|
|
|
0
|
$path =~ s/(Mnet\/Opts\/Set)\.pm$/$1\//; |
43
|
0
|
|
|
|
|
0
|
$path .= ucfirst($pragma) . ".pm"; |
44
|
0
|
|
|
|
|
0
|
$INC{"Mnet/Opts/Set/".ucfirst($pragma).".pm"} = $path; |
45
|
0
|
|
|
|
|
0
|
return; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub pragmas { |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 Mnet::Opts::Set::pragmas |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
$opts = Mnet::Opts::Set::pragmas() |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This function returns a hash containing true values for any Mnet::Opts::Set |
57
|
|
|
|
|
|
|
pragma sub-modules that have been loaded with the perl 'use' command. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Refer to the SEE ALSO section of this document for a list of these sub-modules. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
# return opts hash with values set for used Mnet::Opts::Set sub-modules |
64
|
16
|
|
|
16
|
1
|
22
|
my $opts = {}; |
65
|
16
|
|
|
|
|
297
|
foreach my $module (keys %INC) { |
66
|
1776
|
50
|
|
|
|
2829
|
next if $module !~ /^Mnet\/Opts\/Set\/(\S+)\.pm$/; |
67
|
0
|
|
|
|
|
0
|
$opts->{lc($1)} = 1; |
68
|
|
|
|
|
|
|
} |
69
|
16
|
|
|
|
|
91
|
return $opts; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 SEE ALSO |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
L |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
L |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
L |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
L |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
L |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=cut |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
# normal package return |
91
|
|
|
|
|
|
|
1; |
92
|
|
|
|
|
|
|
|