in reply to GUI-like behavior

UPDATE: This isn't meant to be a debugging tool... I would like the functionality in production-level code. Thus things like Komodo won't help.

Thanks to jeffa for the tip though.

UPDATE 2: I don't need to execute arbitrary code; just prompt the user to change a few integers.

~evan

Replies are listed 'Best First'.
Re: Re: GUI-like behavior
by jdporter (Paladin) on Jul 18, 2003 at 14:35 UTC
    If, as you say, this is for production code, then I really don't think you want the user to be able to change any arbitrary variable at any arbitrary time. There are (I must think) certain variables that it makes sense for them to alter, and certain specific times at which it makes sense for them to be able to do it.

    Thus tye's suggestion is probably reasonable, given that your application is console-based. Then you don't have to (as he says) sprinkle the key checks throughout your program; just at the certain places where it makes sense. I wince at the idea of sprinkling things like that throughout a production system. And if the specific times at which it makes sense to alter the variables are known, and are rather infrequent, you could take the approach of always stopping to ask the user for values, and timing out the request with an alarm. I've done this in the past with some success.

    jdporter
    The 6th Rule of Perl Club is -- There is no Rule #6.