Test::Smoke::Policy - OO interface to handle the Policy.sh stuff.
use Test::Smoke::Policy; my $srcpath = File::Spec->updir; my $policy = Test::Smoke::Policy->new( $srcpath ); $policy->substitute( [] ); $policy->write;
I wish I understood what Merijn is doeing in the original code.
Create a new instance of the Policy object. Read the file or take data from the DATA section.
Get verbosity.
Set the rules for substitutions.
Reset the _rules property.
_rules
_do_subst() does the substitutions and stores the substituted version as the _new_policy attribute.
_do_subst()
_read_Policy() checks the $srcpath for these conditions:
_read_Policy()
$srcpath
$$srcpath
@$srcpath
The @ccflags are passed to $self->default_Policy()
@ccflags
$self->default_Policy()
Generate the default Policy.sh from a set of ccflags, but be backward compatible.
(c) 2001-2015, All rights reserved.
* H.Merijn Brand <hmbrand@hccnet.nl> * Nicholas Clark <nick@unfortu.net> * Abe Timmerman <abeltje@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See:
* <http://www.perl.com/perl/misc/Artistic.html>, * <http://www.gnu.org/copyleft/gpl.html>
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install Test::Smoke, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Smoke
CPAN shell
perl -MCPAN -e shell install Test::Smoke
For more information on module installation, please visit the detailed CPAN module installation guide.