Re: Test::Simple's very slight side effect

2001-10-12 Thread Michael G Schwern

On Fri, Oct 12, 2001 at 11:21:57AM +0900, Tatsuhiko Miyagawa wrote:
> It is because Test::More use()s Carp, thus defines Carp::croak at
> compile time before loading Bareword::Freaks. Duh.

Ok, Test::More will no longer be using Carp.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>http://www.pobox.com/~schwern/
Perl6 Quality Assurance <[EMAIL PROTECTED]>   Kwalitee Is Job One
How can I stoop so low?  Years of practise, that's how. It's been hard
going but now I can stoop lower than a pygmy limbo dancer.
-- BOFH



Test::Simple's very slight side effect

2001-10-11 Thread Tatsuhiko Miyagawa

Here is an example of very slight side effect of using Test::More
in test suite, which I had trouble with today.

  package Bareword::Freaks;
  
  sub foobar {
  require Carp;
  Carp::croak 'blah';
  }
  
  1;

This will be a compile error:

  String found where operator expected at - line 5, near "Carp::croak 'blah'"
(Do you need to predeclare Carp::croak?) 


But, the following test couldn't detect it: It compiles okay.

  use strict;
  use Test::More tests => 1;
  BEGIN { use_ok 'Bareword::Freaks'; }


It is because Test::More use()s Carp, thus defines Carp::croak at
compile time before loading Bareword::Freaks. Duh.


--
Tatsuhiko Miyagawa <[EMAIL PROTECTED]>