Skip Menu |

This queue is for tickets about the Try-Tiny CPAN distribution.

Report information
The Basics
Id: 119891
Status: rejected
Priority: 0/
Queue: Try-Tiny

People
Owner: Nobody in particular
Requestors: ryan.dietrich [...] gmail.com
Cc:
AdminCc:

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



Subject: Issue with try/tiny inside a sub.
The compile time logic that detects the missing semi-colon does not work when the try/catch is inside of a subroutine. #!/usr/bin/env perl use strict; use Data::Dumper; use Try::Tiny; sub test { try { print "begin!\n"; } catch { print "error = $_"; } } print "Hello\n";
On 2017-01-17 10:33:20, RDIETRICH wrote: Show quoted text
> The compile time logic that detects the missing semi-colon does not > work when the try/catch is inside of a subroutine.
There is no special syntax at use here - it's just Perl. Perl does not require a semicolon on the last statement in a block. http://perldoc.perl.org/perlsyn.html#Simple-Statements