On 5/13/05, Stéphane Payrard <[EMAIL PROTECTED]> wrote:
> > > There is syntax to define trait and properties
> > > but is there an API?
> > >
> > >   my $b = eval '$a but true'; # setting a true property
> > >   # API to do it without an eval?
> 
> My question is more generic than my example.
> I may not know at compile time what is the value/trait name and its
> value.

Well, the value's pretty easy--just pass in a variable:

    my $b = $a is foo($bar);

As for the name, I'd be surprised if the standard symbolic-ref syntax
didn't work:

    my $b = $a is ::($foo)($bar);

-- 
Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]>
Perl and Parrot hacker

Reply via email to