Skip Menu |

This queue is for tickets about the Tk-Wizard CPAN distribution.

Report information
The Basics
Id: 109356
Status: open
Priority: 0/
Queue: Tk-Wizard

People
Owner: LGODDARD [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: Should not exit in BEGIN block
t/210_images.t fails if there's no DISPLAY: $ perl t/210_images.t 1..0 # SKIP Test irrelevant without a display _TK_EXIT_(0) BEGIN failed--compilation aborted at t/210_images.t line 44. Problem is the implicit exit() (which is done by plan skip_all => ...) within the BEGIN block. It can be reduced to: $ perl -MTk -e 'BEGIN { eval { tkinit }; exit }' _TK_EXIT_(0) BEGIN failed--compilation aborted at -e line 1. It seems that Tk.pm introduces some special exit() handling which breaks inside a BEGIN block. But I think you can drop the BEGIN{} block here, and do all the checks here outside.
Subject: Re: [rt.cpan.org #109356] Should not exit in BEGIN block
Date: Mon, 23 Nov 2015 03:03:32 +0100
To: bug-Tk-Wizard [...] rt.cpan.org
From: Lee <leegee [...] gmail.com>
Thanks, I shall look into that. On 21/11/2015 21:43, Slaven_Rezic via RT wrote: Show quoted text
> Sat Nov 21 15:43:25 2015: Request 109356 was acted upon. > Transaction: Ticket created by SREZIC > Queue: Tk-Wizard > Subject: Should not exit in BEGIN block > Broken in: 2.157 > Severity: (no value) > Owner: Nobody > Requestors: SREZIC@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=109356 > > > > t/210_images.t fails if there's no DISPLAY: > > $ perl t/210_images.t > 1..0 # SKIP Test irrelevant without a display > _TK_EXIT_(0) > BEGIN failed--compilation aborted at t/210_images.t line 44. > > > Problem is the implicit exit() (which is done by plan skip_all => ...) within the BEGIN block. It can be reduced to: > > $ perl -MTk -e 'BEGIN { eval { tkinit }; exit }' > _TK_EXIT_(0) > BEGIN failed--compilation aborted at -e line 1. > > It seems that Tk.pm introduces some special exit() handling which breaks inside a BEGIN block. But I think you can drop the BEGIN{} block here, and do all the checks here outside. > >
TK won't install here atm, so have made the suggested changes anyway. Will keep an eye on this for a few days whilst getting Tk.