Skip to content

strange catch behaviour #1

Description

@forwardever

I would expect the following code to warn "fail", but it doesn't, is this expected behaviour?

use Try::Tiny;
my $success = try {
    my $class = 'Some::Module::That::Does::Not::Exist';
    eval "require $class";
}
catch {
    warn "fail";
    return undef;
};

however, $success is undef

Plattform
Strawberry Perl Windows

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions