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   __get_smoked_configs( $logfile )
91       Parse the logfile and return a hash(ref) of already processed
92       configurations.
93
94   Test::Smoke::BuildCFG->default_buildcfg()
95       This is a constant that returns a textversion of the default
96       configuration.
97
98   new_configuration( $config )
99       A wrapper around "Test::Smoke::BuildCFG::Config->new()" so the object
100       is accessible from outside this package.
101

PACKAGE

103       Test::Smoke::BuildCFG::Config - OO interface for a build confiuration
104

SYNOPSIS

106           my $bcfg = Test::Smoke::BuildCFG::Config->new( $args, $policy );
107
108       or
109
110           my $bcfg = Test::Smoke::BuildCFG::Config->new;
111           $bcfg->args( $args );
112           $bcfg->policy( [ -DDEBUGGING => '-DDEBUGGING' ],
113                          [ -DPERL_COPY_ON_WRITE => '' ] );
114
115           if ( $bcfg->has_arg( '-Duseithreads' ) ) {
116               # do stuff for -Duseithreads
117           }
118

DESCRIPTION

120       This is a simple object that holds both the build arguments and the
121       policy substitutions. The build arguments are stored as a string and
122       the policy subtitutions are stored as a list of lists. Each
123       substitution is represented as a list with the two elements: the target
124       and its substitute.
125

METHODS

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

SEE ALSO

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