1Test::Smoke::BuildCFG(3U)ser Contributed Perl DocumentatiToenst::Smoke::BuildCFG(3)
2
3
4

NAME

6       Test::Smoke::BuildCFG - OO interface for handling build configurations
7

SYNOPSIS

9           use Test::Smoke::BuildCFG;
10
11           my $name = 'perlcurrent.cfg';
12           my $bcfg = Test::Smoke::BuildCFG->new( $name );
13
14           foreach my $config ( $bcfg->configurations ) {
15               # do somthing with $config
16           }
17

DESCRIPTION

19       Handle the build configurations
20

METHODS

22   Test::Smoke::BuildCFG->new( [$cfgname] )
23       [ Constructor | Public ]
24
25       Initialise a new object.
26
27   Test::Smoke::BuildCFG->continue( $logfile[, $cfgname, %options] )
28       [Constructor | public]
29
30       Initialize a new object without the configurations that have already
31       been fully processed. If *all* configurations have been processed, just
32       pass the equivalent of the new() method.
33
34   $bldcfg->verbose
35       [ Getter | Public]
36
37       Get verbosity.
38
39   Test::Smoke::BuildCFG->config( $key[, $value] )
40       [ ClassAccessor | Public ]
41
42       config() is an interface to the package lexical %CONFIG, which holds
43       all the default values for the new() arguments.
44
45       With the special key all_defaults this returns a reference to a hash
46       holding all the default values.
47
48   $self->read_parse( $cfgname )
49       read_parse() reads the build configurations file and parses it.
50
51   $self->_read( $nameorref )
52       _read() is a private method that handles the reading.
53
54       Reference to a SCALAR build configurations are in $$nameorref
55       Reference to an ARRAY build configurations are in @$nameorref
56       Reference to a GLOB build configurations are read from the filehandle
57       Other values are taken as the filename for the build configurations
58
59   $self->_parse( )
60       _parse() will split the build configurations file in sections.
61       Sections are ended with a line that begins with an equals-sign ('=').
62
63       There are two types of section
64
65       buildopt-section
66       policy-section
67           A policy-section contains a "target-option". This is a build option
68           that should be in the ccflags variable in the Policy.sh file (see
69           also Test::Smoke::Policy) and starts with a (forward) slash ('/').
70
71           A policy-section can have only one (1) target-option.
72
73   $self->_serialize( )
74       _serialize() creates a list of Test::Smoke::BuildCFG::Config objects
75       from the parsed sections.
76
77   __build_list( $list, $previous_args, $policy_subst, $this_cfg, @cfgs )
78       Recursive sub, mainly taken from the old run_tests() in mktest.pl
79
80   $buildcfg->configurations( )
81       Returns the list of configurations (Test::Smoke::BuildCFG::Config
82       objects)
83
84   $buildcfg->policy_targets( )
85       Returns a list of policytargets from the policy substitution sections
86
87   as_string
88       Return the parsed configuration as a string.
89
90   source
91       returns the text-source of this instance.
92
93   sections
94       returns an ARRAYREF of the sections in this instance.
95
96   __get_smoked_configs( $logfile )
97       Parse the logfile and return a hash(ref) of already processed
98       configurations.
99
100   Test::Smoke::BuildCFG->default_buildcfg()
101       This is a constant that returns a textversion of the default
102       configuration.
103
104   new_configuration( $config )
105       A wrapper around "Test::Smoke::BuildCFG::Config->new()" so the object
106       is accessible from outside this package.
107

PACKAGE

109       Test::Smoke::BuildCFG::Config - OO interface for a build confiuration
110

SYNOPSIS

112           my $bcfg = Test::Smoke::BuildCFG::Config->new( $args, $policy );
113
114       or
115
116           my $bcfg = Test::Smoke::BuildCFG::Config->new;
117           $bcfg->args( $args );
118           $bcfg->policy( [ -DDEBUGGING => '-DDEBUGGING' ],
119                          [ -DPERL_COPY_ON_WRITE => '' ] );
120
121           if ( $bcfg->has_arg( '-Duseithreads' ) ) {
122               # do stuff for -Duseithreads
123           }
124

DESCRIPTION

126       This is a simple object that holds both the build arguments and the
127       policy substitutions. The build arguments are stored as a string and
128       the policy subtitutions are stored as a list of lists. Each
129       substitution is represented as a list with the two elements: the target
130       and its substitute.
131

METHODS

133   Test::Smoke::BuildCFG::Config->new( [ $args[, \@policy_substs ]] )
134       Create the new object as an anonymous list.
135
136   $buildcfg->args( [$args] )
137       Accessor for the build arguments field.
138
139   $buildcfg->policy( [@substitutes] )
140       Accessor for the policy substitutions.
141
142   $self->_split_args( )
143       Create a hash with all the build arguments as keys.
144
145   $buildcfg->has_arg( $arg[,...] )
146       Check the build arguments hash for $arg. If you specify more then one
147       the results will be logically ANDed!
148
149   $buildcfg->any_arg( $arg[,...] )
150       Check the build arguments hash for $arg. If you specify more then one
151       the results will be logically ORed!
152
153   $buildcfg->args_eq( $args )
154       args_eq() takes a string of config arguments and returns true if $self
155       has exactly the same args as the $args has.
156
157       There is the small matter of default_args (dfopts) kept as a Class
158       variable in Test::Smoke::BuildCFG!
159
160   $config->rm_arg( $arg[,..] )
161       Simply remove the argument(s) from the list and recreate the arguments
162       line.
163
164   $config->vms
165       Redo the the commandline switches in a VMSish way.
166

SEE ALSO

168       Test::Smoke::Smoker, Test::Smoke::Syncer::Policy
169
171       (c) 2002-2003, All rights reserved.
172
173         * Abe Timmerman <abeltje@cpan.org>
174
175       This library is free software; you can redistribute it and/or modify it
176       under the same terms as Perl itself.
177
178       See:
179
180http://www.perl.com/perl/misc/Artistic.html
181
182http://www.gnu.org/copyleft/gpl.html
183
184       This program is distributed in the hope that it will be useful, but
185       WITHOUT ANY WARRANTY; without even the implied warranty of
186       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
187
188
189
190perl v5.38.0                      2023-07-21          Test::Smoke::BuildCFG(3)
Impressum