Re: interesting behavior in use_ok()

2006-06-27 Thread Michael G Schwern
On 27 Jun 2006 15:01:43 -, Rafael Garcia-Suarez > my $CLASS; > BEGIN { > $CLASS = 'Some::Module'; > use_ok $CLASS or die; # "or die" saves the day maybe BAIL_OUT could be better than die here, in at least a few cases. It depends on if you want to stop just this test script

Re: interesting behavior in use_ok()

2006-06-27 Thread Rafael Garcia-Suarez
Ovid wrote in perl.qa : > > You've run into a problem which surprises a few folks but definitely > causes problems. In a nutshell, use_ok internally traps the "use" > call with an eval. However, even if it fails (as in your case), the > bytecode might still be compiled and in memory and, as a res

Re: interesting behavior in use_ok()

2006-06-27 Thread Ovid
- Original Message From: Geoffrey Young <[EMAIL PROTECTED]> > so, the compile test failed, but bar() could still be called and, in > fact, even executed successfully. Hi Geoff, You've run into a problem which surprises a few folks but definitely causes problems. In a nutshell, use_ok