SPUG: die from BEGIN; how suppress ugly message?

Charles DeRykus ced at carios2.ca.boeing.com
Wed Jan 26 16:59:39 CST 2000


> open STDERR, ">/dev/null"

If I catch your meaning, could you simply wrap
the BEGIN innards in an eval... ?

BEGIN { eval { print "foo\n"; die "bar" }; }

Any fatals will be trapped and available in $@
when the BEGIN block terminates.

Hope this helps,
--
Charles DeRykus

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address





More information about the spug-list mailing list