Skip Menu |

This queue is for tickets about the IO-stringy CPAN distribution.

Report information
The Basics
Id: 39331
Status: open
Priority: 0/
Queue: IO-stringy

People
Owner: Nobody in particular
Requestors: perl [...] galumph.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC:
Subject: IO::Scalar 2.110 doesn't capture final newline from perl 5.10's builtin say()
Date: Tue, 16 Sep 2008 15:59:56 +0000 (GMT)
To: bug-IO-stringy [...] rt.cpan.org
From: perl [...] galumph.com
The attached example emits ">start\nend<" instead of ">start\nend\n".
Download io-scalar-say
application/octet-stream 178b

Message body not shown because it is not plain text.

CC:
Subject: Re: [rt.cpan.org #39331] AutoReply: IO::Scalar 2.110 doesn't capture final newline from perl 5.10's builtin say()
Date: Tue, 16 Sep 2008 16:31:44 +0000 (GMT)
To: bug-IO-stringy [...] rt.cpan.org
From: perl [...] galumph.com
Show quoted text
> The attached example emits ">start\nend<" instead of ">start\nend\n".
Whoops, make that the attached example emits ">start\nend<" instead of ">start\nend\n<".
Subject: Re: [rt.cpan.org #39331] IO::Scalar 2.110 doesn't capture final newline from perl 5.10's builtin say()
Date: Thu, 18 Sep 2008 11:02:48 -0400
To: bug-IO-stringy [...] rt.cpan.org
From: "David F. Skoll" <dfs [...] roaringpenguin.com>
Hi, Show quoted text
> The attached example emits ">start\nend<" instead of ">start\nend\n".
Well, here's something weird. On my Lenny machine with Perl 5.10, I get this output: Show quoted text
>start\nend<
If, however, I simply comment out the "use 5.010" line, I get this output instead: Show quoted text
>start\nend\n<
"use 5.010" seems to be having some kind of weird side-effect; perhaps you should ask the core Perl developers what this is all about? Regards, David.
CC:
Subject: Re: [rt.cpan.org #39331] IO::Scalar 2.110 doesn't capture final newline from perl 5.10's builtin say()
Date: Thu, 18 Sep 2008 15:13:26 +0000 (GMT)
To: bug-IO-stringy [...] rt.cpan.org
From: perl [...] galumph.com
David F. Skoll via RT wrote .. Show quoted text
> If, however, I simply comment out the "use 5.010" line, I get this output > instead: >
> >start\nend\n<
Interesting. Obviously, the difference is that with "use 5.010", the builtin is getting invoked, but without, IO::Handle::say() is getting invoked.
Subject: Re: [rt.cpan.org #39331] IO::Scalar 2.110 doesn't capture final newline from perl 5.10's builtin say()
Date: Thu, 18 Sep 2008 11:39:05 -0400
To: bug-IO-stringy [...] rt.cpan.org
From: "David F. Skoll" <dfs [...] roaringpenguin.com>
Hi, Elliot, Actually, I think the bug may be deeper than this. I think "say" is somehow broken. The following program: #============ CUT HERE ========= #/usr/bin/env perl use 5.010; use strict; use warnings; use IO::Scalar; my $data; my $handle = IO::Scalar->new(\$data); { local $\ = "\n"; print {$handle} "start\nend"; } say {*STDOUT} ">$data<"; #============ CUT HERE ========= works as expected. Adding debugging in IO::Scalar reveals that $\ is indeed defined as "\n". I you replace the { local .. print.. } block with: say {$handle} "start\nend"; Then you get incorrect output, and the debugging code reveals that $\ is undefined. This is contrary to what "perldoc -f say" says. Perhaps you should open a bug report for core Perl? Regards, David.
Subject: Re: [rt.cpan.org #39331] IO::Scalar 2.110 doesn't capture final newline from perl 5.10's builtin say()
Date: Sat, 20 Sep 2008 23:45:08 -0500
To: bug-IO-stringy [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
David F. Skoll via RT wrote: Show quoted text
> Perhaps you should open a bug report for core Perl?
Apparently, already fixed: http://public.activestate.com/cgi-bin/perlbrowse?patch=32873