Re: Untested modules update: There's more than we thought

2001-12-17 Thread Michael G Schwern
On Mon, Dec 17, 2001 at 08:12:43AM +, Piers Cawley wrote: What's wrong with ok ( eval { $foo-isa('Foo') } ); or even: ok (eval { ref($foo) $foo-isa('Foo') }); As Kurt already pointed out, you can do: ok( UNIVERSAL::isa($foo, 'Foo') ); but if it fails

Re: Untested modules update: There's more than we thought

2001-12-17 Thread Gerrit P. Haase
Hallo Michael, Am 2001-12-16 um 21:20 schriebst du: On Sun, Dec 16, 2001 at 11:09:29AM -0700, chromatic wrote: + like( $$out, qr/could not locate your pod2man/, + '... should warn if pod2man cannot be located' ); Gerrit, do you already have a perl installed in the spot

Re: Untested modules update: There's more than we thought

2001-12-17 Thread Piers Cawley
Michael G Schwern [EMAIL PROTECTED] writes: On Mon, Dec 17, 2001 at 08:12:43AM +, Piers Cawley wrote: What's wrong with ok ( eval { $foo-isa('Foo') } ); or even: ok (eval { ref($foo) $foo-isa('Foo') }); As Kurt already pointed out, you can do: ok(

Re: Untested modules update: There's more than we thought

2001-12-16 Thread Michael G Schwern
On Sun, Dec 16, 2001 at 02:41:31PM +, Piers Cawley wrote: Nothing wrong with an adaptor/factory returning something that isn't a Foo, so long as it has the same interface. That's why its isa_ok() and not ref_ok(). On the off chance Foo-new is supposed to return something that bears no

Re: lib.t (was Re: Untested modules update: There's more than we thought)

2001-12-16 Thread Michael G Schwern
On Sun, Dec 16, 2001 at 07:30:37PM +, Nicholas Clark wrote: I just thought of a better way. Since all we're testing is that lib.pm does the right things to @INC, we can presume that if one of require(), do() or use() works, the rest will work. Can't we just test what @INC now

Re: Untested modules update: There's more than we thought

2001-12-16 Thread Michael G Schwern
On Sun, Dec 16, 2001 at 09:30:18PM -0500, Benjamin Goldberg wrote: Suppose we have RandomThing-new which randomly returns an instance of one of a few dozen different classes, which have no relation at all with each other except a common interface. In such an odd case, don't use isa_ok().