Skip Menu | 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

Owner: Nobody in particular
Requestors: SREZIC [...]
Cc: khw [...]

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

CC: khw [...]
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 BEGIN { binmode STDIN, ":encoding(utf8)" } use TryCatch; try { } catch ($e) { } $ cat | 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/ 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/ 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/ line 44 TryCatch::__ANON__("try", 0) called at /opt/perl-5.30.3/lib/site_perl/5.30.3/x86_64-linux/Devel/ 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" 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 , so this could be a related or even the same issue.

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

Please report any issues with to