Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!convex!convex.com!tchrist From: tchrist@convex.com (Tom Christiansen) Newsgroups: comp.lang.perl Subject: knowing your current context Message-ID: <107126@convex.convex.com> Date: 12 Oct 90 16:17:10 GMT Sender: usenet@convex.com Reply-To: tchrist@convex.com (Tom Christiansen) Organization: Convex Computer Corp, Richardson, TX Lines: 18 If I 'do' a file to get some subroutines defined, later call one of the subroutines, and that routine uses a warn or die with out a trailing \n, it is wrong claims that I was in my original calling file (the one who 'did' the library file) not the library file. This is perhaps arguably correct, but I wouldn't argue that way. Of course, the best of all worlds would somehow tell me both. It also botches the line number. I can't figure out where it's pulling that one from. Anybody know how to pull out the current file, line, package, and subroutine from within a perl script? Also, are there any hazards from saying: eval "package $some_package"; --tom -- "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." [Doug Gwyn]