Lazy-Bool

 view release on metacpan or  search on metacpan

lib/Lazy/Bool.pm  view on Meta::CPAN

package Lazy::Bool;

use 5.010000;
use strict;
use warnings;
use Exporter 'import';

our $VERSION   = '0.06';
our @EXPORT_OK = qw(lzb);

sub lzb(&) {
    my $code = shift;
    __PACKAGE__->new($code);
}

sub new {
    my ( $type, $code ) = @_;
    my $klass = ref($type) || $type;
    my $ref = ( ref($code) eq 'CODE' ) ? $code : sub { $code };

    bless $ref => $klass;

lib/Lazy/Bool/Cached.pm  view on Meta::CPAN


use 5.010000;
use strict;
use warnings;
use base 'Lazy::Bool';
use Exporter 'import';

our $VERSION   = '0.06';
our @EXPORT_OK = qw(lzbc);

sub lzbc(&) {
    my $code = shift;
    __PACKAGE__->new($code);
}

sub new {
    my ( $type, $code ) = @_;

    my $klass = ref($type) || $type;

    my $ref = ( ref($code) eq 'CODE' ) ? $code : sub { $code };



( run in 0.305 second using v1.01-cache-2.11-cpan-49f99fa48dc )