On Mon, 10 Jun 2002, Dave Storrs wrote: > > I assume that 'fatal.pm' is a new pragma.
Already exists for Perl 5, actually. > 1) What (if anything) does it do, aside from turning 'fail' into a fatal > exception when used outside a regex? What fatal currently does is wrap built-ins that might return undef with code that will die when undef is returned. I'm just generalizing that to having a keyword that fails in whatever way the calling context desires, whether by returning undef, throwing an exception, or backtracking the current regex. > 2) Do you need to use it before you can (usefully) use 'fail' INSIDE a > regex? (I would assume not, but thought I'd check.) No, it'll be built-in. You'll only need to invoke the pragma to change the defaults. Larry