Data::...::Bool(3pm)

πŸ’– Data::...::Bool β€” the manual page, but make it cute πŸ’–

okay so bestie, welcome to the Data::...::Bool(3pm) page, straight out of the User Contributed Perl Documentation corner of the internet. it's literally a whole page about wrapping booleans and honestly?? obsessed. let's get into it πŸŽ€


✨ NAME ✨

Data::Perl::Role::Bool β€” a wrapping class for boolean values. that's it, that's the whole vibe. she wraps booleans. πŸ‘‘


🌸 VERSION 🌸

version 0.002011

(it's giving very specific. iykyk πŸ’…)


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the lil appetizer, copied exactly, no notes:

use Data::Perl qw/bool/;

my $bool = bool(0);

$bool->toggle; # 1

$bool->unset; # 0

see how she flips and un-flips?? main character energy fr fr 😭✨


πŸ’œ DESCRIPTION πŸ’œ

This class provides a wrapper and methods for interacting with boolean values. like, she's the lil cozy blanket around your 1s and 0s. that's the whole job. she ate. πŸ’…


πŸŽ€ PROVIDED METHODS πŸŽ€

⚠️ heads up bestie: None of these methods accept arguments. like, none. zero. don't even try to hand them a lil extra snack, they will not take it. πŸš«πŸ“
  • new($value) β€” Constructs a new Data::Perl::Collection::Bool object initialized with the passed in value, and returns it. so you hand her a value, she hands back a whole fresh lil object. iconic. ✨
  • set β€” Sets the value to 1 and returns 1. that's it. she said "true" and meant it. πŸ’―
  • unset β€” Set the value to 0 and returns 0. the total opposite mood, respectfully. πŸ™ˆ
  • toggle β€” Toggles the value. If it's true, set to false, and vice versa. Returns the new value. she's a flip-flopper and we LOVE her for it πŸ”₯
  • not β€” Equivalent of 'not $value'. the hater era, but make it a method. πŸ’€

🌈 SEE ALSO 🌈

  • Data::Perl
  • MooX::HandlesVia

go read those too, bestie, they're the extended universe 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Matthew Phillips <mattp@cpan.org>

(the genius behind all this. we stan. ⭐)


This software is copyright (c) 2020 by Matthew Phillips <mattp@cpan.org>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


so yeah!! that's the whole page, every single crumb of it, no cap 🧚 and a lil sign-off for you: this was perl v5.36.0, dated 2022-10-16, and it's the Data::...::Bool(3pm) page. go forth and toggle, bestie πŸ’–πŸŒΈβœ¨

πŸ“¦ where this page comes from