if (!js_InitPerlClass(cx, glob))
if (!JS_InitPerlClass(cx, glob))
main(int argc, char **argv){    JSVersion version;    JSRuntime *rt;    JSContext *cx;    JSObject *glob, *it;    int result;#ifdef XP_OS2   /* these streams are normally line buffered on OS/2 and need a \n, *    * so we need to unbuffer then to get a reasonable prompt          */    setbuf(stdout,0);    setbuf(stderr,0);#endif#ifdef XP_MAC	initConsole("\pJavaScript Shell", "Welcome to js shell.", &argc, &argv);#endif    version = JSVERSION_DEFAULT;#ifndef LIVECONNECT    argc--;    argv++;#endif    rt = JS_NewRuntime(8L * 1024L * 1024L);    if (!rt)	return 1;    cx = JS_NewContext(rt, 8192);    if (!cx)	return 1;    JS_SetErrorReporter(cx, my_ErrorReporter);    glob = JS_NewObject(cx, &global_class, NULL, NULL);    if (!glob)	return 1;    if (!JS_InitStandardClasses(cx, glob))	return 1;    if (!JS_DefineFunctions(cx, glob, shell_functions))	return 1;    /* Set version only after there is a global object. */    if (version != JSVERSION_DEFAULT)	JS_SetVersion(cx, version);    it = JS_DefineObject(cx, glob, "it", &its_class, NULL, 0);    if (!it)	return 1;    if (!JS_DefineProperties(cx, it, its_props))	return 1;#ifdef PERLCONNECT    if (!js_InitPerlClass(cx, glob))        return 1;#endif#ifdef LIVECONNECT	if (!JSJ_SimpleInit(cx, glob, NULL, getenv("CLASSPATH")))            return 1;#endif#ifdef JSDEBUGGER    /*    * XXX A command line option to enable debugging (or not) would be good    */    _jsdc = JSD_DebuggerOnForUser(rt, NULL, NULL);    if (!_jsdc)	return 1;    JSD_JSContextInUse(_jsdc, cx);#ifdef JSDEBUGGER_JAVA_UI    _jsdjc = JSDJ_CreateContext();    if (! _jsdjc)	return 1;    JSDJ_SetJSDContext(_jsdjc, _jsdc);    JSDJ_CreateJavaVMAndStartDebugger(_jsdjc);    /*    * XXX This would be the place to wait for the debugger to start.    * Waiting would be nice in general, but especially when a js file    * is passed on the cmd line.    */#endif /* JSDEBUGGER_JAVA_UI */#ifdef JSDEBUGGER_C_UI    JSDB_InitDebugger(rt, _jsdc, 0);#endif /* JSDEBUGGER_C_UI */#endif /* JSDEBUGGER */    result = ProcessArgs(cx, glob, argv, argc);#ifdef JSDEBUGGER    if (_jsdc)	JSD_DebuggerOff(_jsdc);#endif  /* JSDEBUGGER */    JS_DestroyContext(cx);    JS_DestroyRuntime(rt);    JS_ShutDown();    return result;}