Skip Menu |

This queue is for tickets about the autodie CPAN distribution.

Report information
The Basics
Id: 132494
Status: new
Priority: 0/
Queue: autodie

People
Owner: Nobody in particular
Requestors: lbennettleaver [...] yahoo.co.uk
Cc:
AdminCc:

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



Subject: truncate() function with bare filehandle fails
Date: Mon, 4 May 2020 11:23:03 +0000 (UTC)
To: bug-autodie [...] rt.cpan.org
From: Lata BL <lbennettleaver [...] yahoo.co.uk>
Dear autodie maintainers, Firstly, thank you very much for autodie - I use it a lot. There is a problem when using autodie with truncate() with a bare filehandle name. Here is some sample code << CODE #!/usr/bin/env perl use strict; use warnings; use autodie; open FH, '+<', './truncate-test-file'; seek FH, 0, 0; truncate FH, 0; close FH; CODE >> Generates this error... Bareword "FH" not allowed while "strict subs" in use at ./truncate-test line 7. Execution of ./truncate-test aborted due to compilation errors. It works fine with a scalar (my $fh) filehandle. uname -a output... Linux 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:08:14 UTC 2014 i686 i686 i686 GNU/Linux I've tried it with v5.18.2 (bundled with Lubuntu) and v5.30.2 (built under perlbrew). best regards, mark
Subject: Re: [rt.cpan.org #132494] AutoReply: truncate() function with bare filehandle fails
Date: Mon, 4 May 2020 11:54:48 +0000 (UTC)
To: Bugs in autodie via RT <bug-autodie [...] rt.cpan.org>
From: Lata BL <lbennettleaver [...] yahoo.co.uk>
Apologies, please ignore and close the ticket. I had read the perldoc for the older autodie in perl 5.18. In perl 5.30 I saw the GOTCHA section for chdir,truncate On Monday, 4 May 2020, 12:23:19 BST, Bugs in autodie via RT <bug-autodie@rt.cpan.org> wrote: Greetings, This message has been automatically generated in response to the creation of a trouble ticket regarding:     "truncate() function with bare filehandle fails", a summary of which appears below. There is no need to reply to this message right now.  Your ticket has been assigned an ID of [rt.cpan.org #132494].  Your ticket is accessible on the web at:     https://rt.cpan.org/Ticket/Display.html?id=132494 Please include the string:         [rt.cpan.org #132494] in the subject line of all future correspondence about this issue. To do so, you may reply to this message.                         Thank you,                         bug-autodie@rt.cpan.org ------------------------------------------------------------------------- Dear autodie maintainers, Firstly, thank you very much for autodie - I use it a lot. There is a problem when using autodie with truncate() with a bare filehandle name. Here is some sample code << CODE #!/usr/bin/env perl use strict; use warnings; use autodie; open FH, '+<', './truncate-test-file'; seek FH, 0, 0; truncate FH, 0; close FH; CODE >> Generates this error... Bareword "FH" not allowed while "strict subs" in use at ./truncate-test line 7. Execution of ./truncate-test aborted due to compilation errors. It works fine with a scalar (my $fh) filehandle. uname -a output... Linux  3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:08:14 UTC 2014 i686 i686 i686 GNU/Linux I've tried it with v5.18.2 (bundled with Lubuntu) and v5.30.2 (built under perlbrew). best regards, mark