Acme::...Single(3pm)

πŸ“¦
version 0.12 Β· 2 versions
, in fedora 43

πŸ’– Acme::...Single β€” bestie edition πŸ’–

okay so real talk, this page lives in the User Contributed Perl Documentation section, and its title got so long the header just gave up and wrote Acme::...Single(3pm). The actual name of this thing? Acme::PlayCode::Plugin::DoubleToSingle. it plays with your code. with Single and Double. yes that's the whole vibe. πŸŽ€


✨ NAME ✨

Acme::PlayCode::Plugin::DoubleToSingle β€” Play code with Single and Double πŸ’…


🌸 SYNOPSIS 🌸

like, here's how you'd actually use it, no cap:

use Acme::PlayCode;

my $app = new Acme::PlayCode;

$app->load_plugin('DoubleToSingle');

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 play, and if you pass that rewrite_file => 1 option it will literally override $filename with the played code. iconic. πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

the way this plugin just swaps your quote styles around... let me show you. it takes this:

my $a = "a";
my $b = "'b'";
my $c = qq~c~;
my $d = qq~'d'~;
my $e = q{e};
my $f = 'f';
if ( $a eq "a" ) {
    print "ok";
}

and it becomes this:

my $a = 'a';
my $b = q~'b'~;
my $c = 'c';
my $d = qq~'d'~;
my $e = q{e};
my $f = 'f';
if ( $a eq 'a' ) {
    print 'ok';
}

see what happened?? πŸ‘€ "a" became 'a', qq~c~ became 'c', "ok" became 'ok' β€” but qq~'d'~ stayed exactly as it was, q{e} stayed, 'f' stayed. the ones with quotes hiding inside them got left alone because obviously. it's giving thoughtful. periodt. ✨


🫢 SEE ALSO 🫢

  • Acme::PlayCode
  • Moose
  • PPI
  • MooseX::Object::Pluggable

πŸ‘‘ AUTHOR πŸ‘‘

Fayland Lam, <fayland at gmail.com> β€” shoutout, legend behaviour fr fr πŸ’–


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.

lowkey important: those are the actual terms, bestie, don't go making stuff up about it πŸ’€

and that's the whole page!! built on perl v5.42.0, dated 2025-07-25, and it's still out here slaying as Acme::...Single(3pm) πŸ§šπŸ’œ bye bestie, go play some code ✨

πŸ“¦ where this page comes from