Test::Most::EXIT()

2008-04-23 Thread Ovid
Hi all, I'd like advice on how best to implement this. Currently, because so many module authors thoughtfully break $SIG{__DIE__}, I routinely find that things like this break: ok $foo or die; # sometimes still exits with zero # or simply doesn't exit Would an EXIT() fun

Re: Test::Most::EXIT()

2008-04-23 Thread David Golden
On Wed, Apr 23, 2008 at 5:52 AM, Ovid <[EMAIL PROTECTED]> wrote: > I do, however, feel like I'm missing something fundamental, but I can't > figure out what. How about: sub DIE { local $SIG{__DIE__}; die } or even just "sub die" and import that into the *.t file and "or die" should do what you

Test::Most::EXIT()

2008-04-23 Thread Ovid
Hi all, I'd like advice on how best to implement this. Currently, because so many module authors thoughtfully break $SIG{__DIE__}, I routinely find that things like this break: ok $foo or die; # sometimes still exits with zero # or simply doesn't exit Would an EXIT() fun

Re: An alternate view on deferred plans

2008-04-23 Thread Buddy Burden
Hey guys, sorry to be long in getting back to this. My project here at work heated up quite a bit and I've been running around trying to make sure it's all under control. Sounds like you guys were all off in Oslo having too much fun to respond anyways. :-) chromatic, > > And/or, it may make s

Re: Test::Most::EXIT()

2008-04-23 Thread Michael G Schwern
Ovid wrote: I'd like advice on how best to implement this. Currently, because so many module authors thoughtfully break $SIG{__DIE__}, I routinely find that things like this break: ok $foo or die; # sometimes still exits with zero # or simply doesn't exit Is it possibl

Re: Test::Most::EXIT()

2008-04-23 Thread Eric Wilhelm
# from Michael G Schwern # on Wednesday 23 April 2008 12:28: >Is it possible for $SIG{__DIE__} to stop the die?  I don't think it > is. Only with a goto, but some people are rumored to use exit(). What I wonder is how Ovid ended up with a module setting a global die handler that wasn't under hi

Re: Test::Most::EXIT()

2008-04-23 Thread Smylers
Eric Wilhelm writes: > What I wonder is how Ovid ended up with a module setting a global die > handler that wasn't under his direct control Why would it being under his control mean he didn't want to test for it? I've been in situations before where a co-worker has inserted a die handler into a

Re: Test::Most::EXIT()

2008-04-23 Thread Eric Wilhelm
# from Smylers # on Wednesday 23 April 2008 14:51: >Why would it being under his control mean he didn't want to test for > it? He didn't say anything about testing for it. Ovid said he was thinking about changing his code to e.g. "open(my $fh, '<', $file) or EXIT;", which IMO is not required b