Re: Module naming - Test::Import::DontRun

2010-10-08 Thread Charles Colbourn
When developing code to include One might think it intolerably rude To use words ungrammatical As a method pragmatical To avoid compilation being screwed :-P On 8 October 2010 00:13, Paul Johnson p...@pjcj.net wrote: On Thu, Oct 07, 2010 at 12:36:41PM +0100, Charles Colbourn wrote:

Re: Module naming - Test::Import::DontRun

2010-10-08 Thread Charles Colbourn
Hi all, It occurs to me that the uses for this could extend outside testing. Looking at CPAN, the root namespace 'Include' already exists, so Include::DontRun would be a viable name, and seems pretty descriptive to me. Anyone got any objections? I've handled the __DATA__ and __END__ cases now.

Re: Module naming - Test::Import::DontRun

2010-10-07 Thread nadim khemir
I must admit that I didn't get what you mean. Care to enlighten me with a piece of code, some flow, anything that doesn't make me feel stupid. Nadim.

Re: Module naming - Test::Import::DontRun

2010-10-07 Thread Charles Colbourn
Mea Culpa - it wasn't a very clear description. OK, so perhaps you have a script like this: ###myscript.pl### doStuff(); doOtherStuff(); sub doStuff{ # things that need testing } sub doOtherStuff{ # things you don't want to run } __END__ and you don't have the option of wrapping the top

Re: Module naming - Test::Import::DontRun

2010-10-07 Thread nadim khemir
OK, I get what you want to do. I have seen this before. My brains being what they are lately, I don't remember where but it was not so long ago. Maybe Andy maybe someone else. Maybe even you ;) So before you go further, you can, if you so wish, look around a bit. I'm sure that other with

Fwd: Module naming - Test::Import::DontRun

2010-10-07 Thread Charles Colbourn
-- Forwarded message -- From: Charles Colbourn charles.colbo...@googlemail.com Date: 7 October 2010 10:10 Subject: Re: Module naming - Test::Import::DontRun To: ebhans...@cpan.org @Eirik There's some complex and potentially slightly fragile stuff to handle @EXPORT if you want

Re: Module naming - Test::Import::DontRun

2010-10-07 Thread Charles Colbourn
wrote: -- Forwarded message -- From: Charles Colbourn charles.colbo...@googlemail.com Date: 7 October 2010 10:10 Subject: Re: Module naming - Test::Import::DontRun To: ebhans...@cpan.org @Eirik There's some complex and potentially slightly fragile stuff to handle @EXPORT

Re: Module naming - Test::Import::DontRun

2010-10-07 Thread Eirik Berg Hanssen
On Thu, Oct 7, 2010 at 10:22 AM, Charles Colbourn charles.colbo...@googlemail.com wrote: It works very simply, by wrapping the source of 'myscript.pl' in {last; code }'. Well, as it seems it does no -import(), but just compiles the code ... Test::LegacyScript::Compile? There's some

Re: Module naming - Test::Import::DontRun

2010-10-07 Thread Paul Johnson
On Thu, Oct 07, 2010 at 12:36:41PM +0100, Charles Colbourn wrote: Test::Include::DontRun I'll just point out that any name which includes DontRun rather than Don't::Run has sold its soul and should probably start with Com::ReallyBigCorporation::Enterprise:: Then I'll duck (low) and I will run.

Re: Module naming - Test::Import::DontRun

2010-10-07 Thread Bill Ward
On Thu, Oct 7, 2010 at 4:13 PM, Paul Johnson p...@pjcj.net wrote: On Thu, Oct 07, 2010 at 12:36:41PM +0100, Charles Colbourn wrote: Test::Include::DontRun I'll just point out that any name which includes DontRun rather than Don't::Run has sold its soul and should probably start with

Module naming - Test::Import::DontRun

2010-10-06 Thread Charles Colbourn
Hi, I have a module that attempts to import scripts/modules without executing anything in top level scope, so that test scripts can import their functions/methods and test them. Is Test::Import::DontRun a sufficiently descriptive name? I also thought about Test::DontRun, and Test::DontExecute,