On 2005.09.23, Daniel P. Stasinski <[EMAIL PROTECTED]> wrote:
> Useless code, yes, but it should ns_eval correctly but does not.
> 
>   set code "set somevar {\$blah}"
>   ns_eval $code                #doesn't work
>   eval $code                   #works

To answer my own question:

    server1:nscp 1> ns_info patchlevel
    4.0.10a
    server1:nscp 2> set code "set somevar {\$blah}"
    set somevar {$blah}
    server1:nscp 3> ns_eval $code
    can't read "blah": no such variable
    server1:nscp 4> eval $code
    $blah

Yes, this (kinda) makes sense -- if you look at the ns_eval code, it
double-evaluates the input script (which, seems to cause lots of
confusion and grief).

So: ns_eval works as designed, but perhaps its design is broken.

-- Dossy

-- 
Dossy Shiobara              [EMAIL PROTECTED] | http://dossy.org/
Panoptic Computer Network   http://panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to