Well I feel dumb.  I haven't tried it yet, but that makes sense.  It's what
I get for working on this in the weeee hours of the morning.

Thanks,
Paul

On Fri, Oct 30, 2020 at 7:48 AM Timo Paulssen <t...@wakelift.de> wrote:

> On 30/10/2020 07:58, Paul Procacci wrote:
> > Here is what I have ... trimmed.
> >
> > #################################################################
> > use JSON::Pretty;
> > use Staticish;
> >
> > unit class MyClass is Static;
> >
> > method client(::?CLASS:D: Str:D $service! --> MyClass)
> > {
> >         my %data := from-json %?RESOURCES{$service}.slurp;
> >         my $type = Metamodel::ClassHOW.new_type(
> >                 name => $service,
> >                 ver => v0.0.1,
> >                 auth => 'github:me'
> >         );
> >
> >         $type.HOW.add_parent($type, 'MyClass');
> >         $type.HOW.compose($type);
> >         $type.new;
> > }
> > #################################################################
>
>
> Hi Paul,
>
> I think when you're passing a string to add_parent, you're actually
> setting the class Str as the parent. raku will not go looking for a
> class with that name. Instead, it expects you to pass the actual type
> object.
>
> Hope that helps!
>    - Timo
>


-- 
__________________

:(){ :|:& };:

Reply via email to