Toby Inkster

Results 86 comments of Toby Inkster

From [email protected] on 2020-12-03 09:15:19 : Den tis 1 dec. 2020 18:35Toby Inkster via RT skrev: > > > Type::Tiny does internally cache the result of $type1->of($type2) to avoid >...

Hmmm, I dunno. ```perl package Foo { use Moo; use Types::Standard -types; has n => ( is => 'ro', isa => Maybe[Int], coerce => 1, ); } say Foo->new( n...

Further complication… what about this? ```perl my $dict1 = Dict[ foo => HashRef ]; my $dict2 = Dict[ foo => ArrayRef ]; my $combined = combine( $dict1, $dict2 ); ```...

PS: I have tried the below. It doesn't work, but I have no idea why it does not. ``` mop::meta(ref $class) ->get_attribute('$!superclass') ->store_data_in_slot_for($class, $parent); mop::apply_metaclass($class, mop::meta($parent)); ```

I take that back: I believe `mop::meta(ref $class)` is correct. This gets the `$!superclass` attribute for mop::class itself, and then calls `store_data_in_slot_for` on that attribute passing `$class` (i.e. the meta...

Ideally an autoload replacement should, rather than executing the missing method, either return the method as a coderef, or return `undef`, or die. Why? - `$obj->can($methodname)` can easily hook into...

I suppose this also implies that the following should work: ``` has ($!foo, $!bar) = (666, 999); ``` And then you end up also having to support: ``` has ($!foo,...

If you have a recent version of `Type::Tiny` installed, the following should also work: ```perl use Function::Parameters; use Type::Tiny::Class v2.0 qw( URI HTTP::Tiny ); method get_uri ( URI $uri, HTTPTiny...

Well, it's a trade-off like with other decentralized services such as HTTP and SMTP. If you run your own server, you're not subject to someone else's whims and you have...