Re: Merging STDOUT and STDERR

2006-09-22 Thread Barrie Slaymaker
I concur, disentangling untagged, combined STDERR and STDOUT streams is very difficult: the source process' output buffering will cause desynchronization between the two streams and the OS's timeslices my be long enough that you get a lot of output between polls in the parent process. Further

Re: Redirecting STDERR/STDOUT on Win32 (was Re: Terrible diagnostic failure)

2006-09-18 Thread Barrie Slaymaker
I had lots of trouble getting IPC::Run to work well on Win32; if it worked well there, I'd recommend it for this application. If anyone knows how, in Perl, to open up to 3 pipes and then use WaitForMultipleObjects() on the ends the parent process reads & writes, please let me know. That's the

Re: Foreign modules in test scripts?

2005-02-21 Thread Barrie Slaymaker
David Cantrell wrote: The practice of bundling third-party modules with yours is IMO very wrong indeed. If I bundle (eg) Test::Frobnitz, and a hundred other people bundle Test::Frobnitz, then this leads to two problems: Agreed. See the earlier advice about the inc/ directory so you can bundle,

[OT] TT2 docs

2002-12-20 Thread Barrie Slaymaker
On Fri, Dec 20, 2002 at 09:54:50AM -0500, darren chamberlain wrote: > > The docs for Template::Provider state: > > fetch($name) fetch()ing's the easy part. Even *I* got that far long ago. It's the fact that you can coax metadata out of the template objects with AUTOLOADed methods that I didn

Re: [RFC] Module::Husbandry

2002-12-20 Thread Barrie Slaymaker
On Fri, Dec 20, 2002 at 09:12:09AM -0500, darren chamberlain wrote: > * Barrie Slaymaker <[EMAIL PROTECTED]> [2002-12-20 08:52]: > > I've kludged code to peer in to TT2 templates to get at [%META%] > > declarations (it does not allow this by default AFAICS, surpris

Re: [RFC] Module::Husbandry

2002-12-20 Thread Barrie Slaymaker
On Fri, Dec 20, 2002 at 08:17:16AM -0500, darren chamberlain wrote: > * Barrie Slaymaker <[EMAIL PROTECTED]> [2002-12-20 04:05]: > > Part of QA is defining best practices. I've been encoding a few > > operations I use a lot when writing new perl module distributions in

[RFC] Module::Husbandry

2002-12-20 Thread Barrie Slaymaker
Part of QA is defining best practices. I've been encoding a few operations I use a lot when writing new perl module distributions in to script form to make my code and POD more consistent. Here's a prerelease of them: http://users.telerama.com/~rbs/src/Module-Husbandry-0.0001.tar.gz and the

Graphically depicting coverage vs. test results

2002-12-10 Thread Barrie Slaymaker
Here's an interesting way of depicting the statements that are likely to have cause test failures: http://www.cc.gatech.edu/aristotle/Tools/tarantula/ Tarantula displays each source code statement using color models that reflect its relative success rate of its execution by the test

[ANNOUNCE] tv (Test::Verbose 0.001)

2002-10-24 Thread Barrie Slaymaker
New! Improved! As Seen On TV!! ahem. tv is a command bundled with Test::Verbose that puts an easier, smarter interface around the ExtUtils testing system. Aside from easing debugging access (see below), the main use of tv is to run test scripts in verbose mode, either by naming them or by naming

Re: Help spreading Test

2002-09-19 Thread Barrie Slaymaker
On Fri, Sep 13, 2002 at 07:22:04AM -0700, David Wheeler wrote: > On Friday, September 13, 2002, at 06:25 AM, Johan Vromans wrote: > > >Tchk. I think it's quite nice and powerful to be able to download an > >arbitrary module's .tar.gz and get it going with the simple "perl > >Makefile.PL; make al

Test::Verbose && tv

2002-09-11 Thread Barrie Slaymaker
-n, --dry-run, --just-print, --recon Print out the make command but don't run it. -h, -?, --help Print out full help text (this page). See Test::Verbose for details. COPYRIGHT Copyright 2002, R. Barrie Slaymaker, Jr. All Rights Reserved. LICENSE You may use this under the terms of any of the BSD, Artistic, or GPL licenses. AUTHOR Barrie Slaymaker <[EMAIL PROTECTED]>

[ANNOUNCE] Test-Differences-0.45, Text-Diff-0.34

2002-07-14 Thread Barrie Slaymaker
Test-Differences-45 is now out with the below patch. Also: I released a new Text::Diff, 0.35 (which Test-Differences-0.45 requires) that fixes and improves the escaping logic so that "\t" and "\\t" are escaped properly ("\\t" was not being escaped properly) when escaping. Escaping (still) is onl

[ANNOUNCE] Test-Differences 0.43

2002-05-13 Thread Barrie Slaymaker
As part of a much more detailed email about some cool code he's writing, Yves Orton <[EMAIL PROTECTED]> wrote (in part): > > my ($ar,$x,$y)=([]); > $ar->[0]=\$ar->[1]; > $ar->[1]=\$ar->[0]; > $x=\$y; > $y=\$x; > > Test::Differences::eq_or_diff($ar,[$x,$y]); > > Outpu

Re: Alternative code review ideas?

2002-01-30 Thread Barrie Slaymaker
On Wed, Jan 30, 2002 at 02:24:59AM +0900, Tatsuhiko Miyagawa wrote: > Recently I've been doing this with two ways: > > 1) Unit testing for "Model/Control" classes *nod* > 2) Acceptance Testing with Live HTTP, DB Server > > We've acomplished with following tools: > > * shell script, to setup/t

Fwd: CPAN Upload: R/RB/RBS/Test-Differences-0.411.tar.gz

2001-12-21 Thread Barrie Slaymaker
This fixes a bug or two and improves readability by removing the middle column of indexes if and only if it is identical to the first column and by performing selective whitespace excaping to highlight differences in whitespace (see below). - Barrie t/99example1..3 not ok 1 - differences in

Re: [PATCH] Re: emitting messages in Test::*

2001-12-21 Thread Barrie Slaymaker
On Wed, Dec 19, 2001 at 04:11:00PM -0500, Barrie Slaymaker wrote: > > Looks nice to me (not that I have anything to do with Schwern's modules > :), but I think it needs to be in Test::More instead of Test::Simple. Sorry, misread the patch (gah, need a vacation). - Barrie

Re: [PATCH] Re: emitting messages in Test::*

2001-12-19 Thread Barrie Slaymaker
On Wed, Dec 19, 2001 at 12:20:35PM -0700, chromatic wrote: > On Wed, 19 Dec 2001 05:12:05 -0700, Michael G Schwern wrote: > > > Its been on the TODO list to toss a diag() into Test::More. > > > > ok( ... ) || diag(...); > > > > for some reason I keep putting it off. > > > > Test::Simple wo

Re: v0.3 [Was: CPAN Upload: R/RB/RBS/Test-Differences-0.2.tar.gz]

2001-12-19 Thread Barrie Slaymaker
On Mon, Dec 17, 2001 at 04:10:30PM +0900, Tatsuhiko Miyagawa wrote: > On Sat, 15 Dec 2001 09:10:33 -0500 > Barrie Slaymaker <[EMAIL PROTECTED]> wrote: > > > Now I see what you're after with the -M approach, thanks for the > > example. > > Cool. > &

emitting messages in Test::*

2001-12-19 Thread Barrie Slaymaker
I noticed that Test::Builder offers the ability to emit messages with s/^/# /mg, which is very nice. Can/should this capability be exposed via Test::Simple, Test::More, etc? Sometimes it's nice to explain what to do about a test failure that may be an intermittent failure, or to warn that they s

Re: v0.3 [Was: CPAN Upload: R/RB/RBS/Test-Differences-0.2.tar.gz]

2001-12-15 Thread Barrie Slaymaker
On Sat, Dec 15, 2001 at 01:18:23PM -0500, Michael G Schwern wrote: > On Sat, Dec 15, 2001 at 10:52:07AM -0700, chromatic wrote: > > On Sat, 15 Dec 2001 07:10:33 -0700, Barrie Slaymaker wrote: > > > > > How about having Test::More use eq_or_diff_data() in is_deeply() if

Re: v0.3 [Was: CPAN Upload: R/RB/RBS/Test-Differences-0.2.tar.gz]

2001-12-15 Thread Barrie Slaymaker
Now I see what you're after with the -M approach, thanks for the example. On Sat, Dec 15, 2001 at 07:54:17PM +0900, Tatsuhiko Miyagawa wrote: > Two cases for using Test::* > > 1) Testing our application (for paying work) > > it's good to use T::D in the first place. We're agreed here :). > 2

Re: v0.3 [Was: CPAN Upload: R/RB/RBS/Test-Differences-0.2.tar.gz]

2001-12-15 Thread Barrie Slaymaker
On Sat, Dec 15, 2001 at 01:56:19AM -0500, Michael G Schwern wrote: > On Sat, Dec 15, 2001 at 02:41:13AM -0500, Barrie Slaymaker wrote: > > There's also a test script for the escaping now :). I'd love to test > > characters for codepoints > 0xff, but they'r

v0.3 [Was: CPAN Upload: R/RB/RBS/Test-Differences-0.2.tar.gz]

2001-12-14 Thread Barrie Slaymaker
Thanks both for the testing & bugfixes. Here's the escaping portion of changes from 0.2 to 0.3, does this seem better? There's also a test script for the escaping now :). I'd love to test characters for codepoints > 0xff, but they're borken / unsupported in all released perls, I think. Other r

CPAN Upload: R/RB/RBS/Test-Differences-0.2.tar.gz

2001-12-13 Thread Barrie Slaymaker
ss this behavior if you don't like the namespace pollution. At this time, each data structure is flattened independantly, which looks goofy if one goes through Data::Dumper and the other doesn't. AUTHOR Barrie Slaymaker <[EMAIL PROTECTED]> LICENSE Copyright 2001 Barrie Slaymaker, All Rights Reserved. You may use this software under the terms of the GNU public license, any version, or the Artistic license.

Re: Proper way to build a mix-in library for Test::More?

2001-12-12 Thread Barrie Slaymaker
On Wed, Dec 12, 2001 at 08:54:51PM -0500, Michael G Schwern wrote: > On Wed, Dec 12, 2001 at 04:38:20PM -0500, Barrie Slaymaker wrote: > > I've written a Test::Differences[1] that outputs things like: > > > > not ok 5 > > # Failed test 5 in blib/lib/Test

Proper way to build a mix-in library for Test::More?

2001-12-12 Thread Barrie Slaymaker
I've written a Test::Differences[1] that outputs things like: not ok 5 # Failed test 5 in blib/lib/Test/Differences.pm at line 221 fail #4 *TODO* # +-+--+ # | Got | Expected | # +-+--+ # | a\n | a\n | # >x* b\n < # | c\n | c\n

Re: ANNOUNCE Pod::Tests is now Test::Inline

2001-08-29 Thread Barrie Slaymaker
On Wed, Aug 29, 2001 at 01:51:48AM -0400, Michael G Schwern wrote: > > First, the syntax for the code examples has changed. Instead of > "=also begin/end example" it's "=for example begin/end". This doesn't > cause existing POD viewers to choke. So they just silently throw away all the example

Re: ANNOUNCE: Pod::Coverage

2001-08-27 Thread Barrie Slaymaker
On Sun, Aug 26, 2001 at 03:02:16PM +0100, Richard Clamp wrote: > > Caveats, this isn't heading to CPAN today at the testsuite is far from > comprehensive, and I'd like some feedback before I release it. That > and I was due to meet people at the pub an hour ago. How would I keep it from complai

Re: [PATCH] h2ph, etc.

2001-07-26 Thread Barrie Slaymaker
The below exchange on p5p made me wonder if there's a need for an API that issues warnings or informational messages in addition to the current pass/fail alternatives. Kind of like a "shouldbe" alternative to "is". This would allow a probe for possible gotchas to be made in a release before actu

Re: Status check -- trying to wrapup

2000-09-19 Thread Barrie Slaymaker
Adam Turoff wrote: > > My point is (C), this is a discussion about POD tools, and there is no > need to form a consensus about that. We will have a need for better tools > over time, and we will most likely get better tools over time. >From my point of view, the discussion was about how to impl

Re: the push is on

2000-09-19 Thread Barrie Slaymaker
Dave Storrs wrote: > > Barrie Slaymaker's RFC 11: > Examples encoded with =also for|begin|end POD commands > which hasn't been updated in 48 days. > > is everyone comfortable declaring them Frozen? Yup. - Barrie

Re: Risk of unacceptably slow perl6 performance

2000-09-13 Thread Barrie Slaymaker
Nathan Torkington wrote: > > I'd rather see someone write a program that involves file reading > and writing, regular expression manipulation, some string tweaking > (length, concatenation, etc), and some object method calls. That > covers the spectrum of Things That I'm Worried About. pod2text

Re: Risk of unacceptably slow perl6 performance

2000-09-12 Thread Barrie Slaymaker
Adam Turoff wrote: > > And it'll take a decent amount of time to build up a reasonably large > set of discrete benchmarks. Seems like the perl5 test scripts might be a good place to start. - Barrie

Re: [p5pod] [ANNOUNCE] Pod::StdParser, Pod::Tests proof of concept

2000-09-06 Thread Barrie Slaymaker
Marek Rouchal DAT CAD HW Tel 25849 wrote: > > I would not want to delete the warnings, I'd prefer an option to suppress > them or a configurable handler to deal with them (like poderror in > Pod::Parser). Sorry, I assumed you'd noticed that most of them are already in Pod::StdParser. > Pod::Com

Re: [p5pod] [ANNOUNCE] Pod::StdParser, Pod::Tests proof of concept

2000-09-06 Thread Barrie Slaymaker
Marek Rouchal DAT CAD HW Tel 25849 wrote: > > And for hyperlinking you need two passes anyway, and thanks to Storable you > can conveniently store the whole tree and run the second pass over it as soon > as all hyperlink destinations have been computed. I don't want to go into the > details, but

Re: [p5pod] [ANNOUNCE] Pod::StdParser, Pod::Tests proof of concept

2000-09-05 Thread Barrie Slaymaker
Brad Appleton wrote: > > Marek has been doing similar work on an experimental > Pod::Compiler module that sounds suspiciously like your > Pod::StdParser. Definitely make sure you look at each > other's code before going too much further. I haven't seen it published anywhere, but his previous des

[ANNOUNCE] Pod::StdParser, Pod::Tests proof of concept

2000-09-04 Thread Barrie Slaymaker
In http://slaysys.com/src/Pod-StdParser-0.001.tar.gz you should find an experimental Pod::StdParser, with a Pod::Tests and a tweaked Pod::Parser and a Pod::Text that's undergoing a transplant from Pod::Select to Pod::StdParser (yes, I know, that'd break Pod::Usage). I've disabled the Makefile ins

Re: RFC 183 (v1) "=for testing" - Embedded tests

2000-09-04 Thread Barrie Slaymaker
Michael G Schwern wrote: > > On Fri, Sep 01, 2000 at 12:18:32AM -0400, Barrie Slaymaker wrote: > > Here's a quick take on a Pod::Tests, I threw it together as part of my =also > > prototype code. > > Looking at the docs... umm, how do you use it? Let's as

Pod::Tests [Was: RFC 183 (v1) "=for testing" - Embedded tests]

2000-09-01 Thread Barrie Slaymaker
Michael G Schwern wrote: > > On Fri, Sep 01, 2000 at 12:18:32AM -0400, Barrie Slaymaker wrote: > > Here's a quick take on a Pod::Tests, I threw it together as part of my =also > > prototype code. > > Looking at the docs... umm, how do you use it? Let's as

Re: RFC 183 (v1) "=for testing" - Embedded tests

2000-08-31 Thread Barrie Slaymaker
Here's a quick take on a Pod::Tests, I threw it together as part of my =also prototype code (I hacked it in to a copy of Pod::Select, named "Pod::AlsoSelect") since that's what Pod::Text relies on). The =also stuff seems to work. - Barrie -8<8<-8<

Re: Perl QA FAQ

2000-08-31 Thread Barrie Slaymaker
Michael G Schwern wrote: > > This was mentioned briefly a while ago. Barrie, are you still up for > maintaining a FAQ? Sure. Looking forward to seeing some frequent enough questions to bootstrap it with. I was going to keep it in simple POD (but of course!). Any recommendations from FAQ main

Re: Pod::StdParser

2000-08-07 Thread Barrie Slaymaker
Brad Appleton wrote: > > Hmmn - not sure what you mean by "generate" callbacks. The C<$self->cmd_head1()> style calls we've discussed before. Sorry to continue out-of-context context here :-/. > Pod::Parser already provides for registration and invocation > of callbacks in a number of ways, sa

Re: Pod::StdParser

2000-08-07 Thread Barrie Slaymaker
Marek Rouchal DAT CAD HW Tel 25849 wrote: > > Hello all, > > I didn't manage to read all of your discussion, but let me elaborate a > little on Pod::StdParser or Pod::Compiler and its benefits. I was proposing Pod::StdParser as a more low-level approach that generated callbacks instead of build

Re: [RFC ??, v1] =also for|begin|end POD commands

2000-08-05 Thread Barrie Slaymaker
Russ Allbery wrote: > > Presenting it in > the RFC as part of a testing framework is actually a bit confusing, since > the impact of the primitive is a lot broader. I'll gladly tweak the RFC to be more sensical, for instance by including your =also for abstract example. The testing example was

Re: [p5pod] [RFC ??, v1] =also for|begin|end POD commands

2000-08-04 Thread Barrie Slaymaker
Russ Allbery wrote: > > > - moving $self->cmd_foo() dispatch to Pod::Parser, > > - allows =for/=begin...=end filtering that second bullet was under the "creating a Pod::StdParser" item in my original, so > This is certainly doable (although I question whether Pod::Parser is the > right pl

Re: [RFC ??, v1] =also for|begin|end POD commands

2000-08-04 Thread Barrie Slaymaker
Russ Allbery wrote: > > I can sort of see the point, although I'd personally use a considerably > simpler approach for extracting code excerpts for testing, probably more > ad hoc. That may be a mistake on my part, and I can see why people would > want to do this in some more formal way. That's

Re: [p5pod] [RFC ??, v1] =also for|begin|end POD commands

2000-08-04 Thread Barrie Slaymaker
Marek Rouchal DAT CAD HW Tel 25849 wrote: > > On Thu, 3 Aug 2000, Brad Appleton wrote: > > BA>Besides, I think there is still need for a Pod::Translator > BA>of Pod::Compiler module that uses (or is subclassed from) > BA>Pod::Parser to be the *real* base parser that people use (the > BA>one that

Re: [p5pod] [RFC ??, v1] =also for|begin|end POD commands

2000-08-03 Thread Barrie Slaymaker
Brad Appleton wrote: > > On Wed, Aug 02, 2000 at 03:52:15PM -0400, Barrie Slaymaker wrote: > > =head1 IMPLEMENTATION > > > > The C<=also> command is implemented in Pod::Parser in a process > > called "=also mangling". > > Why is this handl

[RFC ??, v1] =also for|begin|end POD commands

2000-08-02 Thread Barrie Slaymaker
|begin|end POD commands =head1 VERSION Maintainer: Barrie Slaymaker <[EMAIL PROTECTED]> Date: 02 Aug 2000 Version: 1 Mailing List: perl-qa Number: To Be Determined =head1 ABSTRACT I. The C<=also for|begin|end> commands are shorthand having two copies of a section of POD (typi

Re: RFC: Automated Testing Of Code Examples In Documentation and "=for example"

2000-07-28 Thread Barrie Slaymaker
"Bryan C. Warnock" wrote: > > Is each example to be standalone? ie, I'm thinking of this more as a testing tagset now: =begin testing [] =end testing =for testing [] where the optional indicates the file to append the indicated paragraphs to. This plays well with using =also (for|begin|en

Re: =also for example [was - Re: RFC: Automated Testing Of Code Examples ...]

2000-07-28 Thread Barrie Slaymaker
Michael G Schwern wrote: > > Barrie, you suggested it, so its your babe now! You have the option > to sketch out a new RFC and start working on this or punt the > responsibility to somebody else. I'll take "sketch out a new RFC" for $200, Michael. I'll also tie it in with the =for test stuff.

Re: RFC: Embedded Tests and =test

2000-07-28 Thread Barrie Slaymaker
Michael G Schwern wrote: > > Perl will have to compile all the test routines all the time. This > both slows startup and eats memory. This pretty much kills the > proposal. :( Yup. Brain fart withdrawn. > I don't see how the "sub TEST" thing improves except to keep POD pure > documentation.

Re: RFC: Automated Testing Of Code Examples In Documentation and "=for example"

2000-07-28 Thread Barrie Slaymaker
Jonathan Scott Duff wrote: > > Just a few changes: > > . Don't rely on both a preamble and a postamble (postambles are > optional) > . all consecutive verbatim paragraphs after a "=end example_preamble" > would be a single set of code to test. > . Better names than "example_preamble" and "ex

Re: RFC: JART - Just Another Regression Test

2000-07-28 Thread Barrie Slaymaker
Michael G Schwern wrote: > > GREAT IDEA! Its yours! Organize a perl-qa FAQ or get someone to do > it for you. Would a perlqa.pod man page be a more effective tool? - Barrie

Re: RFC: Automated Testing Of Code Examples In Documentation and "=for example"

2000-07-28 Thread Barrie Slaymaker
Michael G Schwern wrote: > > tchrist makes a > good point, we can't make it anyting but easy to write POD. I think the =also tag approach does that pretty well, but I'm not hearing anyone else say yay/nay on it. Whether the examples get converted to tests could be flagged in POD at the top of t

Example of =also && =for example [Was: =also?]

2000-07-28 Thread Barrie Slaymaker
[[CCed back to perl-qa]] Marek Rouchal DAT CAD HW Tel 25849 wrote: > > I don't understand the benefit of =also in this context. Could you please > elaborate some more on this? The goal is to be able to extract snippets of example code from the POD and test them. The =also solution is kind of a

Re: RFC: JART - Just Another Regression Test

2000-07-27 Thread Barrie Slaymaker
Jonathan Scott Duff wrote: > > > P.S. Why is this perl-qa? Shouldn't it be perl6-qa? > > I believe Schwern has already answered that ... I think we have here our first FAQ :-). - Barrie

=also? [Was: RFC: Automated Testing Of Code Examples In Documentation and "=for example"]

2000-07-27 Thread Barrie Slaymaker
ble 8<-------8<--- - Barrie Barrie Slaymaker wrote: > > Michael G Schwern wrote: > > > > Using the =for POD tag we can do this. > > > > =pod > > > > Here is a nice example of how to add one and one in Perl. > > > >

Re: RFC: Automated Testing Of Code Examples In Documentation and "=for example"

2000-07-27 Thread Barrie Slaymaker
Michael G Schwern wrote: > > Using the =for POD tag we can do this. > > =pod > > Here is a nice example of how to add one and one in Perl. > > =for example > > print 2 + 2; > > The existing POD utilities would have to be modified to consider "=for > example" as Perl code whic

Re: RFC: Embedded Tests and =test

2000-07-27 Thread Barrie Slaymaker
Michael G Schwern wrote: > > In One Sentence > --- > > Regression tests should be embedded in the code and documentation near what > it is they're testing. s/embedded/embeddable/ and I'm there. I don't think you can necessarily embed tests right near the code you want to test, and