Skip to content

strange catch behaviour #1

@forwardever

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

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