Re: Test::Builder versus Unicode

2004-12-22 Thread Nicholas Clark
On Wed, Dec 22, 2004 at 11:41:56AM -0800, Ovid wrote: > --- Nicholas Clark <[EMAIL PROTECTED]> wrote: > > > On Wed, Dec 22, 2004 at 10:26:02AM -0800, David Wheeler wrote: > > > 1. Perl gets smarter about duping file handles, so that the dupes > > get > > > the same i/o layer settings as the handl

Re: Test::Builder versus Unicode

2004-12-22 Thread Ovid
--- Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Wed, Dec 22, 2004 at 10:26:02AM -0800, David Wheeler wrote: > > 1. Perl gets smarter about duping file handles, so that the dupes > get > > the same i/o layer settings as the handles they dupe. > > Changing this going forwards doesn't change any

Re: Test::Builder versus Unicode

2004-12-22 Thread Nicholas Clark
On Wed, Dec 22, 2004 at 10:26:02AM -0800, David Wheeler wrote: > 1. Perl gets smarter about duping file handles, so that the dupes get > the same i/o layer settings as the handles they dupe. Changing this going forwards doesn't change any of the installed perls out there in the wild. So whatever

Re: Test::Builder versus Unicode

2004-12-22 Thread David Wheeler
On Dec 20, 2004, at 6:44 PM, David Wheeler wrote: PS Somebody should drag autrijus into this. I'll try to grab him on IRC in the morning... I got him this morning. Here's the discussion: 09:50am] Theory: seen autrijus [09:50am] purl: autrijus was last seen on #p5p 1 hour and 32 minutes ago, sayin

Re: Test::Builder versus Unicode

2004-12-20 Thread David Wheeler
On Dec 20, 2004, at 6:41 PM, Michael G Schwern wrote: PS Somebody should drag autrijus into this. I'll try to grab him on IRC in the morning... Regards, David

Re: Test::Builder versus Unicode

2004-12-20 Thread Michael G Schwern
My Official Policy on this is now to let people who actually understand character encodings to work it out and just wait for a patch. PS Somebody should drag autrijus into this. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/ We don't know. But if we did, we would

Re: Test::Builder versus Unicode

2004-12-20 Thread David Wheeler
On Dec 20, 2004, at 6:19 PM, Michael G Schwern wrote: Is there a module or function in Perl that can provide this information? Why does it matter what it was set to before? I'm always going to be shoving text out through this filehandle. It matters because if I'm using Big5 in my module, I *don't

Re: Test::Builder versus Unicode

2004-12-20 Thread Michael G Schwern
On Mon, Dec 20, 2004 at 06:20:41PM -0800, David Wheeler wrote: > If not, another option is to add a binmode option to Test::Builder (and > the modules that depend on it). So you could do something like this: > > use Test::More tests => 6, binmode => ':utf8'; > > Thoughts? Again, this is not s

Re: Test::Builder versus Unicode

2004-12-20 Thread chromatic
On Mon, 2004-12-20 at 18:20 -0800, David Wheeler wrote: > If not, another option is to add a binmode option to Test::Builder (and > the modules that depend on it). So you could do something like this: > >use Test::More tests => 6, binmode => ':utf8'; > > Thoughts? I'd rather override Test:

Re: Test::Builder versus Unicode

2004-12-20 Thread David Wheeler
On Dec 20, 2004, at 6:13 PM, David Wheeler wrote: If there was a way to tell what mode was on STDERR before you duped it, you could just set it to the same. Something like: my $mode = what_binmode(STDERR); my $fh = $builder->failure_output; binmode $fh, $mode; Is there a module or function

Re: Test::Builder versus Unicode

2004-12-20 Thread Michael G Schwern
On Mon, Dec 20, 2004 at 06:13:54PM -0800, David Wheeler wrote: > >Test::Builder should do something like this internally, its not like > >anyone's > >going to drive binary data through a TB filehandle. The question is > >how does one do it without breaking older perls? > > If there was a way to

Re: Test::Builder versus Unicode

2004-12-20 Thread David Wheeler
On Dec 20, 2004, at 6:06 PM, Michael G Schwern wrote: use Test::Builder; BEGIN {my $fh = Test::Builder->new->failure_output; binmode $fh, ':utf8';} Test::Builder should do something like this internally, its not like anyone's going to drive binary data through a TB filehandle. The question

Re: Test::Builder versus Unicode

2004-12-20 Thread Michael G Schwern
On Mon, Dec 20, 2004 at 04:50:57PM -0800, Ovid wrote: > And looking at line 1005: > > sub _print_diag { > my $self = shift; > > local($\, $", $,) = (undef, ' ', ''); > my $fh = $self->todo ? $self->todo_output : $self->failure_output; > print $fh @_; # here there be smart quotes