Acme::...ndition(3pm)
π NAME π
ok so bestie, meet Acme::PlayCode::Plugin::ExchangeCondition β a whole plugin whose entire personality is playing code with exchanging condition. yes that's the actual name. it flips your conditions around and honestly? iconic. π
it's part of the User Contributed Perl Documentation and the manpage goes by Acme::...ndition(3pm) (the 3pm is the manual section, iykyk). π¦
β¨ SYNOPSIS β¨
here's the whole vibe, no cap:
use Acme::PlayCode;
my $app = new Acme::PlayCode;
$app->load_plugin('ExchangeCondition');
my $played_code = $app->play( $code );
# or
my $played_code = $app->play( $filename );
# or
$app->play( $filename, { rewrite_file => 1 } ); # override $filename with played code
so you load the plugin, you call play, and it hands you back your $played_code. you can feed it either a $code string or a $filename. π
and if you're feeling spicy, that third one passes { rewrite_file => 1 } and it overrides $filename with the played code β yes, it writes over the file, bestie, be aware. π«Ά
πΈ DESCRIPTION πΈ
okay so here's literally the whole point of this plugin. it takes a condition and swaps which side of the comparison the operands are on. watch:
if ( $a eq "a" ) {
print "1";
} elsif ( $b eq 'b') {
print "2";
} elsif ( $c ne qq~c~) {
print "3";
} elsif ( $c eq q~d~) {
print '4';
}
becomes β¬οΈ
if ( "a" eq $a ) {
print "1";
} elsif ( 'b' eq $b ) {
print "2";
} elsif ( $c ne qq~c~) {
print "3";
} elsif ( q~d~ eq $c ) {
print '4';
}
the way that $a eq "a" turned into "a" eq $a?? obsessed. π and notice the lil details β the ne one stayed exactly as it was, untouched, $c ne qq~c~ and all, no notes. π the plugin does its thing and dips.
π SEE ALSO π
go read these too, fr fr:
Acme::PlayCodeMoosePPIMooseX::Object::Pluggable
π AUTHOR π
Fayland Lam, <fayland at gmail.com> β yes that's the actual email in the manpage, keep it in the quotes bestie. π
π COPYRIGHT & LICENSE π
Copyright 2008 Fayland Lam, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π
and that's the whole page, no skips, no summaries, every last detail accounted for. π
mwah π this was perl v5.42.0, dated 2025-07-25, and yes, it really is Acme::...ndition(3pm) β go forth and exchange some conditions, bestie. π¦β¨
π¦ where this page comes from
- fedora 43: perl-Acme-PlayCode 0.12-43.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