Clownf...oolean(3pm)

πŸ“¦
version 0.8.0 Β· 3 versions
, in fedora 43, fedora 44

πŸ’– Clownf...oolean(3pm) πŸ’–

okay bestie, welcome to the Clownf...oolean(3pm) page β€” this is the User Contributed Perl Documentation, and we're about to talk about the most chaotic little class in the whole Clownfish universe: Clownfish::Boolean. yes it's literally just true and false. no it is not boring. sit down. πŸŽ€


✨ NAME ✨

Clownfish::Boolean β€” Boolean type. that's it, that's the whole personality. πŸ¦‹


🌸 SYNOPSIS 🌸

here's the vibe check in code form:

use Clownfish::Boolean qw( $true_singleton $false_singleton );

my $bool = Clownfish::Boolean->singleton($truth_value);
my $truth_value = $bool->get_value;

if ($bool->equals($true_singleton)) {
    print "true\n";
}

see how clean that is?? no cap, iconic. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea πŸ«– β€” there are only two singleton instances of this class, and they are:

  • $true_singleton
  • $false_singleton

and they're exported on demand. that's right, you don't get a million boolean objects floating around being messy. you get exactly two. main character energy. πŸ‘‘


πŸŽ€ CONSTRUCTORS πŸŽ€

✨ singleton ✨

my $bool = Clownfish::Boolean->singleton($truth_value);

hand it a value and it hands you back either $true_singleton or $false_singleton, depending on what you supplied. literally the easiest decision this class will ever make. πŸ”₯


🌈 METHODS 🌈

πŸ’– get_value πŸ’–

my $bool = $boolean->get_value();

returns the value of the Boolean. yes queen, just give us the truth. πŸ™ˆ

πŸ¦‹ clone πŸ¦‹

my $result = $boolean->clone();

returns a clone of the object. a little copy of itself, adorable, obsessed. 😭


πŸ‘‘ INHERITANCE πŸ‘‘

Clownfish::Boolean isa Clownfish::Obj. family tree stays winning. 🌸


πŸ’€ reminder bestie: $true_singleton and $false_singleton are singletons β€” there are only two instances of this class, full stop. don't go trying to make more. πŸ’…

and that's the whole page, fr fr πŸ’– this was written up as perl v5.42.3 on 2026-09-02 β€” go slay your booleans, bestie πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from