Skip Menu |

This queue is for tickets about the TryCatch CPAN distribution.

Report information
The Basics
Id: 77749
Status: new
Priority: 0/
Queue: TryCatch

Owner: Nobody in particular
Requestors: EDAVIS [...]

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

Subject: Unhelpfully half-works if TryCatch loaded in a different package
Download (untitled) / with headers
text/plain 767b
Create two files 'a' and '' with these contents: ==> a <== use lib '.'; use X; try {} catch {} ==> <== package X; use TryCatch; 1; Now 'perl a' will appear to work correctly. Even though you forgot to 'use TryCatch' in that file, no error is raised from the try {} catch {} construct. However, change the code in 'a' slightly, to use lib '.'; use X; try {} catch ($err) {} Now you get a syntax error. This is puzzling for the programmer, who had code which appeared to be working but gives an odd error when changing 'catch {}' to 'catch ($err) {}'. It would be better for any use of try and catch to fail cleanly if the TryCatch module has not been loaded in the current package, although it might have been loaded elsewhere by some other package.

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

Please report any issues with to