Re: How to best have statements execute only during dev/testing?

2006-01-10 Thread A. Pagaltzis
Hi Ben, * Ben Evans <[EMAIL PROTECTED]> [2006-01-10 18:20]: >I'd make a slightly stronger statement than that: If you were >congenitally insane, wilfully stupid or drunk, you could >consider a source filter for this. Depends. Additive filters that the same code can run without are sane when used

Re: How to best have statements execute only during dev/testing?

2006-01-10 Thread dakkar
Matisse Enzer wrote: The trick I want is that if my code is running in a production environment (perhaps determined at compile-time) then I want my Devel::Assert stuff to basically disappear. So the question is, what is the lowest-impact way to do that? This entry in BooK's use.perl journal mi

Re: How to best have statements execute only during dev/testing?

2006-01-10 Thread Ben Evans
On Tue, Jan 10, 2006 at 05:44:45PM +0100, Paul Johnson wrote: > > This isn't an answer to your question, but in general production is the > environment in which your code will be exposed to the data and > conditions which have had the least testing, and to which you will have > the least access an

Re: How to best have statements execute only during dev/testing?

2006-01-10 Thread Matisse Enzer
On Jan 10, 2006, at 8:44 AM, Paul Johnson wrote: I suppose you could consider a source filter, but I couldn't recommend that. I am in fact considering using a filter, but it scares me - perhaps because I have never done it before. --- Ma

Re: How to best have statements execute only during dev/testing?

2006-01-10 Thread Matisse Enzer
By the way - I have also been looking at Test::Assertions --- Matisse Enzer <[EMAIL PROTECTED]> http://www.matisse.net/ - http://www.eigenstate.net/

Re: How to best have statements execute only during dev/testing?

2006-01-10 Thread Paul Johnson
On Tue, Jan 10, 2006 at 08:11:43AM -0800, Matisse Enzer wrote: > I'd like to create a class that provides a bunch of assertion > methods, like Carp::Assert, etc. I want to have an object oriented > interface, so in some code I'm developing I would have: > > > use Devel::Assert; > my $tes

How to best have statements execute only during dev/testing?

2006-01-10 Thread Matisse Enzer
I'd like to create a class that provides a bunch of assertion methods, like Carp::Assert, etc. I want to have an object oriented interface, so in some code I'm developing I would have: use Devel::Assert; my $tester = Devel::Assert->new( on_fail => carp ); # or on_fail => cluck, etc.

Re: SKIP blocks and the debugger

2006-01-10 Thread Adam Kennedy
Kirrily Robert wrote: Does anyone else find that SKIP: { } blocks bugger up the debugger? I'll be happily bouncing on the "n" key to get to round about the vicinity of the failing test, and then blam, it sees a skipped test and just fast-forwards to the end. K. Yep Actually, eval doe