MOO-cows Mailing List Archive
Re: your mail
On Wed, 13 Mar 1996, Pavel Curtis wrote:
> > And finally, for completeness sake I suggest a tovalue() or fromliteral()
> > builtin.
> Use eval(), as Andy pointed out.
Correct me if I'm wrong:
Using eval() for this allows the supposed "literal" to do things like
call verbs, built-ins, etc., no matter how it is passed into eval. Which
means that if I don't want this to happen (for example, I'm converting a
value given as a literal string inputted by a user and I don't want them
to be able to do mischief by, for example, by calling someone's :tell.
with a properly formatted string.) Presumably,
fromliteral/tovalue/whatever wouldn't allow this.
The alternative is to perform a check to make sure that the string is
genuinely a literal value before passing it to eval, but even a regexp for
this is somewhat less than trivial.
ResComp Network Support Technician, Bursley Hall
"Invisibility is in the eye of the beholder."
Home Page: http://www-personal.engin.umich.edu/~cunkel/
- No Subject
- From: Pavel Curtis <firstname.lastname@example.org>
Subject Index |