develooper Front page | perl.perl6.language | Postings from May 2005

Re: trait and properties thru getter/setters

Thread Previous | Thread Next
From:
=?iso-8859-1?Q?St=E9phane?= Payrard
Date:
May 13, 2005 12:20
Subject:
Re: trait and properties thru getter/setters
Message ID:
20050513192016.GB11769@stefp.dyndns.org
On Fri, May 13, 2005 at 06:37:50PM +0000, mark.a.biggar@comcast.net 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?
> I don't understand why you think you need the eval here?

My question is more generic than my example.
I may not know at compile time what is the value/trait name and its
value.

> > 
> > A trait setter probably does not make sense but for the
> > implementer because it should not be set at run time.
> > 
> > Incidentally, in a interactive environment it would be cool
> > to access the documentation of variables and functions using
> > properties. Say "doc" and "udoc" respectively for the full and
> > one line version.
> > 
> 
> --
> Mark Biggar
-- 
  cognominal stef


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About