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

Raisin::Types::Base

SYNOPSIS

    my $Price =
        Raisin::Types::Base->new(
            check => sub {
                my $v = shift;
                return if ref $v;
                $v =~ /^[\d.]*$/;
            },
            in => sub {
                my $v = shift; # SCALAR REF
                $$v = sprintf '%.2f', $$v;
            },
        );

DESCRIPTION

check then in.

new

Create new type.

check

Check subroutine.

in

Some actions on the value.