Note that even though neither of the aforementioned modules supports an
else-block you can simulate one. Both modules allow to return a value from the
try-block. Try::Tiny returns true/false by itself, Syntax::Keyword::Try returns whatever the
try-block returns (on success). Basically
my $success = try {
# Runs first
1;
} catch {
# Runs if exception occurs in try block
} finally {
# This code *always* executes
};
if ( $success )
{
# Executes if try block *succeeds*
}
holli
You can lead your users to water, but alas, you cannot drown them.