Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!mcsun!ukc!slxsys!ibmpcug!robobar!ronald From: ronald@robobar.co.uk (Ronald S H Khoo) Newsgroups: comp.lang.perl Subject: usersubs vs require broken? Message-ID: <1991Apr27.154440.8089@robobar.co.uk> Date: 27 Apr 91 15:44:40 GMT Sender: ronald@robobar.co.uk (Ronald S H Khoo) Organization: Robobar Ltd., Perivale, Middx., ENGLAND. Lines: 32 Is there any known bad interaction between usersubs and "require"? I've got this little curseperl program which dies if I "require 'keys.ph'", but works fine with keys.ph in the file itself. (Keys.ph is tiny, and is included below, the actual program is also tiny, but probably won't work with a standard BSD curseperl :-( -- it aggravates some nasty bugs in curses which I had to fix. One symptom I get is that the magicvars $COLS and $LINES seem to be clobbered if keys.ph is 'require'd. I think $stdscr is too, which may explain why the whole thing just cores on me before anything happens. Help! -- keys.ph -- sub KEY_F0 {0410;} sub KEY_F { local($x) = @_; eval "( &KEY_F0 + ($x))"; } sub KEY_DOWN {0402;} sub KEY_UP {0403;} sub KEY_LEFT {0404;} sub KEY_RIGHT {0405;} sub KEY_HOME {0406;} sub KEY_IC {0513;} sub KEY_NPAGE {0522;} sub KEY_PPAGE {0523;} sub KEY_LL {0533;} sub KEY_B2 {0532;} 1; -- Ronald Khoo +44 81 991 1142 (O) +44 71 229 7741 (H)