Group
Extension

Matches 4

Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.008005.tar.gz, TOBYINK, 2025; MetaCPAN )
Type-Tiny/lib/Type/Utils.pm ( view source; MetaCPAN )
the type of the incoming value.
Example blatantly stolen from the Moose documentation:

   sub to_json
   {
      my $value = shift;
      
      return match_on_type $value => (
         HashRef() =>
 to_json( $hash->{$_} ) }
               sort keys %$hash
            ) . ' }';
         },
         ArrayRef() => sub {
            my $array = shift;
            '[ '.( join ", " => map { to_json($_
q { '"' . $_ . '"' },
         Undef() => q {'null'},
         => sub { die "$_ is not acceptable json type" },
      );
   }

Note that unlike Moose, code can be specified as a string instead of a
co
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.008005.tar.gz, TOBYINK, 2025; MetaCPAN )
Type-Tiny/lib/Type/Tiny/Manual/Installation.pod ( view source; MetaCPAN )
t resort, you can manually install it. Download the tarball and
unpack it.

Consult the file META.json for a list of pre-requisites. Install these
first.

To build Type-Tiny:

  % perl Makefile.PL
  %
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.008005.tar.gz, TOBYINK, 2025; MetaCPAN )
Type-Tiny/lib/Types/Standard/Dict.pm ( view source; MetaCPAN )
als => { username => 'bob', password => 's3cr3t' },
    headers     => { 'Accept' => 'application/json' },
    url         => 'http://example.net/api/v1/stuff',
    method      => 'GET',
  } );

It's 
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.008005.tar.gz, TOBYINK, 2025; MetaCPAN )
Type-Tiny/lib/Types/TypeTiny.pm ( view source; MetaCPAN )
verload
fallbacks may actually be useless as a practical boolean. But some common
objects such as JSON::PP's booleans overload "0+" instead of overloading
"bool" (thankfully with fallbacks enabled!) s
on of this type is to be a version of B<Bool> which also
accepts common boolean objects such as L<JSON::PP::Boolean>. It is currently
unstable and the exact definition of the type may change to better

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.