Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the Devel-Declare CPAN distribution.

Report information
The Basics
Id: 132931
Status: new
Priority: 0/
Queue: Devel-Declare

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

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



CC: khw [...] cpan.org
Subject: Current Devel::Declare breaks TryCatch (under some circumstances)
Download (untitled) / with headers
text/plain 1.2k
The following small script breaks with new Devel::Declare, if piped into the perl interpreter: $ cat test.pl BEGIN { binmode STDIN, ":encoding(utf8)" } use TryCatch; try { } catch ($e) { } $ cat test.pl | perl5.30.3 -c Couldn't find declarator 'try' at /opt/perl-5.30.3/lib/site_perl/5.30.3/x86_64-linux/Devel/Declare/Context/Simple.pm line 47. Devel::Declare::Context::Simple::skip_declarator(TryCatch=HASH(0x55d729d96448)) called at /opt/perl-5.30.3/lib/site_perl/5.30.3/x86_64-linux/TryCatch.pm line 83 TryCatch::_parse_try("TryCatch", "main", "try", 0) called at /opt/perl-5.30.3/lib/site_perl/5.30.3/x86_64-linux/TryCatch.pm line 44 TryCatch::__ANON__("try", 0) called at /opt/perl-5.30.3/lib/site_perl/5.30.3/x86_64-linux/Devel/Declare.pm line 277 Devel::Declare::linestr_callback("const", "try", 0) called at - line 3 It does not fail if the script is called "normally" using "perl5.30.3 -c test.pl" It does not fail if the binmode() call is removed or moved to runtime. It does not fail in any case with older Devel::Declare (tried 0.006019). The "Couldn't find declarator" errors are mentioned also in https://rt.cpan.org/Ticket/Display.html?id=131226 , so this could be a related or even the same issue.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.