Test::S...::Policy(3)
π Test::S...::Policy(3) π
okay so bestie, welcome to the User Contributed Perl Documentation section, this is Test::S...::Policy and she's here to serve π
β¨ NAME β¨
Test::Smoke::Policy β an OO interface to handle the Policy.sh stuff. no cap, that's the whole job π
π¦ SYNOPSIS π¦
use Test::Smoke::Policy;
my $srcpath = File::Spec->updir;
my $policy = Test::Smoke::Policy->new( $srcpath );
$policy->substitute( [] );
$policy->write;
look at her go, iconic behavior honestly πΈ
π DESCRIPTION π
fr fr: "I wish I understood what Merijn is doing in the original code."
that's it. that's the description. the author said what they said and honestly? relatable. we've all been there staring at legacy code at 2am ππ
π METHODS π
π Test::Smoke::Policy->new( $srcpath )
creates a brand new instance of the Policy object, main character energy β¨. it reads the file, or β plot twist β takes the data straight from the DATA section π
π $policy->verbose
gets the verbosity. that's it, that's the whole method π«Ά
π $policy->set_rules( $rules )
sets the rules for substitutions. setting boundaries, we love to see it π
π $policy->reset_rules( )
resets the "_rules" property. clean slate, fresh start, new era πΈ
π $policy->_do_subst( )
_do_subst() does the substitutions and stores the substituted version as the _new_policy attribute. she does the work and she keeps the receipts π₯
π $policy->write( )
just the signature, bestie β the original page doesn't say more about this one, so I'm not gonna make stuff up π
π $policy->_read_Policy( $srcpath[, $verbose[, @ccflags]] )
_read_Policy() checks the $srcpath for these conditions:
- reference to a SCALAR Policy is in
$$srcpathβ - reference to an ARRAY Policy is in
@$srcpathβ - reference to a GLOB Policy is read from the filehandle β
- other values are taken as the base path for
Policy.shβ
the @ccflags get passed to "$self->default_Policy()" π
π $policy->default_Policy( [@ccflags] )
generates the default Policy.sh from a set of ccflags, but β and this is the important part β be backward compatible. respect the elders, periodt π
π COPYRIGHT π
(c) 2001-2015, All rights reserved.
shoutout to the legends who made this happen, no cap:
- 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. slay, open source rights π
See:
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. translation: she's hoping for the best, but don't come for her if things go sideways, bestie π
and that's the whole page!! this was perl v5.42.0, dated 2025-07-25, and yeah that footer is giving vintage but she still ate π
β¨ bye bestie, go write some Policy.sh π¦
π¦ where this page comes from
- fedora 43: perl-Test-Smoke 1.84-2.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms