The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Devel::Ladybug::Bool - Overloaded object class for booleans

DESCRIPTION

Extends Devel::Ladybug::Num.

SYNOPSIS

  #
  # File: YourApp/Example.pm
  #
  use Devel::Ladybug qw| :all |;

  create "YourApp::Example" => {
    myBool => Devel::Ladybug::Bool->assert()

    # ...
  };

  #
  # File: somecaller.pl
  #
  use YourApp::Example;

  my $ex = YourApp::Example->new(...);

  if ( $ex->myBool ) {
    print "True\n";
  } else {
    print "False\n";
  }

  $ex->setMyBool(true);

SEE ALSO

This file is part of Devel::Ladybug.