Skip Menu |

This queue is for tickets about the Tree-DAG_Node CPAN distribution.

Report information
The Basics
Id: 105798
Status: resolved
Priority: 0/
Queue: Tree-DAG_Node

People
Owner: Nobody in particular
Requestors: TEAM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.26
Fixed in: 1.27



Subject: use open qw(:std :utf8) again
Hi Ron, Looks like the use open qw(:std :utf8); line is back. As mentioned before (see 1.16 release) this tends to break things when used in a module. Specifically, it turns on the UTF-8 encoding layer on STDIO when any code does 'use Tree::DAG_Node'. That's no good when code is expecting a different encoding (raw, etc.) - in my case it breaks everything in Tickit::DSL, due to Tickit::Widget::Tree loading Tree::DAG_Node. Could you take it out again? cheers, Tom
(I see this is also being done in your other distribution here: https://metacpan.org/source/RSAVAGE/Lingua-EN-GivenNames-1.00/lib/Lingua/EN/GivenNames.pm#L1)
Subject: Re: [rt.cpan.org #105798] use open qw(:std :utf8) again
Date: Sun, 12 Jul 2015 10:57:18 +1000
To: bug-Tree-DAG_Node [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Thanx for the reports. I've used it in about 28 of my modules, some of which are Local::* ones. I copied it from Tom Christiansen's Standard Preamble: http://www.perl.com/pub/2012/04/perlunicook-standard-preamble.html I'll start taking it out, and see which modules' test still work. Tree::DAG_Node's tests do, which is reassuring. On 11/07/15 05:30, Karen Etheridge via RT wrote: Show quoted text
> Queue: Tree-DAG_Node > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=105798 > > > (I see this is also being done in your other distribution here: https://metacpan.org/source/RSAVAGE/Lingua-EN-GivenNames-1.00/lib/Lingua/EN/GivenNames.pm#L1) >
-- Ron Savage - savage.net.au
V 1.27 is now on CPAN. A new Lingua::EN::GivenNames is too, but I did not test it properly at home, so you takes your chances. I will fix the issues with some scripts/*.pl not running.
Thanks for the quick fix. As mentioned before, that preamble only makes sense for a script. In a module, it's not appropriate - in general it's not a good idea to be changing I/O layers on STDIN/STDOUT/STDERR as a side effect of loading a module. Adding 'use open' to scripts is probably safe enough. cheers, Tom On 2015-07-12 01:53:01, ron@savage.net.au wrote: Show quoted text
> Hi > > Thanx for the reports. > > I've used it in about 28 of my modules, some of which are Local::* > ones. > > I copied it from Tom Christiansen's Standard Preamble: > > http://www.perl.com/pub/2012/04/perlunicook-standard-preamble.html > > I'll start taking it out, and see which modules' test still work. > > Tree::DAG_Node's tests do, which is reassuring. > > On 11/07/15 05:30, Karen Etheridge via RT wrote:
> > Queue: Tree-DAG_Node > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=105798 > > > > > (I see this is also being done in your other distribution here: > > https://metacpan.org/source/RSAVAGE/Lingua-EN-GivenNames- > > 1.00/lib/Lingua/EN/GivenNames.pm#L1) > >
Subject: Re: [rt.cpan.org #105798] use open qw(:std :utf8) again
Date: Mon, 13 Jul 2015 08:38:28 +1000
To: bug-Tree-DAG_Node [...] rt.cpan.org
From: Ron Savage <ron [...] savage.net.au>
Hi Tom On 12/07/15 22:17, Tom Molesworth via RT wrote: Show quoted text
> Queue: Tree-DAG_Node > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=105798 > > > Thanks for the quick fix. > > As mentioned before, that preamble only makes sense for a script. In a module, it's not appropriate - in general it's not a good idea to be changing I/O layers on STDIN/STDOUT/STDERR as a side effect of loading a module. > > Adding 'use open' to scripts is probably safe enough.
Agreed. Eventually, I even figured that out myself :-). Cheers. -- Ron Savage - savage.net.au