All help topics · Link to this topic
Showing help on '$no_one'
$no_one
... is a powerless player. He owns no objects, not even himself; nor does he own any verbs. He is, however, a programmer and thus may use eval(). In fact his sole purpose is to evaluate questionable code. `questionable' could be in either or both of the following senses
(1) Its origin is sufficiently uncertain so that there is no obvious way of deciding whose permissions it should run under.
(2) The code itself is potentially malicious, i.e., to the extent that one does not want to be evaluating it using one's own permissions.
set_task_perms($no_one); is thus the canonical idiom in wizard code for rendering anything that follows mostly harmless. For use by ordinary programmers, we have:
$no_one:eval(string)
which attempts to evaluate an arbitrary string using $no_one's permissions.
string is either an expression or ";" followed by one or more statements, of which the final semicolon may be omitted. return values are what eval() would return (either {1,value} or {0,@error_messages}).
Similarly, we have
$no_one:eval_d(string)
which attempts to evaluate the specified string, but does it without the debug flag turned on (so that, for example, you'll get an error as opposed to terminating by traceback).
And, as a helpful utility for calling verbs whose behavior may be unpredictable, there is
$no_one:call_verb(object, verb name, args)
which calls the specified verb with $no_one's permissions.