Skip to content

Actual $@ being swallowed in MooX::Options::Role #77

Description

@burak

Hi,

I don't have a simple test case, but got bitten by this and I had to patch the local installation of this file MooX/Options/Role.pm to be able to see the actual error.

Here is a demonstration of the problem:

$ perl -wle '$@ = q{isa check for "foo" failed:  at (eval 890) line 416.}; if ( $@ =~ /^isa\scheck.*?failed:\s/x ) { print STDERR substr( $@, index( $@, q{:} ) + 2 ) }'
 at (eval 890) line 416.

So, the actual error isa check for "foo" failed: is dropped and all that is displayed is the meaningless at (eval 890) line 416. portion.

print STDERR substr( $@, index( $@, ':' ) + 2 );

I'm not sure how you want to tackle this, but I'd like to see the unmodified $@ personally.

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