p5-type-tiny
p5-type-tiny copied to clipboard
Perl 5 distribution Type-Tiny; see homepage for downloads and documentation.
Extracting this from #110. Basically a shortcut for: ```perl my $combined = Dict[ $dict1->parameters->@*, $dict2->parameters->@*, ]; ``` This could be a function, a method, an overload, etc. Just something to...
Migrated from [rt.cpan.org #133814](https://rt.cpan.org/Ticket/Display.html?id=133814) (status was 'open') Requestors: * [email protected] From [email protected] on 2020-11-26 17:10:22 : The subject pretty much says it all. There is ->coerce which returns the original...
I'm assuming I'm doing something horribly wrong, but here's a tiny type library (I've tried to pare it down to a minimal test case). Note that the `YAMLBool` type coerces...
This story is reproducable with various perls, I just used a v5.34.1: I build the new perl, install CPAN::Reporter, install Type-Tiny-XS; this gives the PASS report http://www.cpantesters.org/cpan/report/6246e6fe-fa3b-11ee-aaa7-b8f845334300; now I try...
More of a footgun then anything else, but if one mistakenly passes two parameters to Optional, the resultant error message contains both, which can confuse the end user: ``` perl...
I found a few small minor typos, so I'll send this patch.
Type::Tiny 2.004000 I'm trying to handle a legacy API issue by using multiple signatures. The old API is foo( $hashref, %options ) i.e., first is positional, rest are named. The...
Version 2.00400. Peering at the code, it looks like my $type = Type::Tiny->new( ..., coercion => [ $type, $coderef ...] ) is accepted, and is equivalent to my $type =...
I am expecting both tests to pass. Unfortunately the `empty string` test is failing. ``` use Test::More tests => 2; use Type::Tie qw( ttie ); use Types::Standard qw( Num Str...
Here's a parentless parameterized type: ``` #! perl use strict; use warnings; package My::Types { use Type::Library -base; __PACKAGE__->meta->add_type( Type::Tiny->new( name => 'Sexagesimal', constraint_generator => sub { return Type::Tiny->new( constraint...