NAME Eval::Util - Utilities related to eval() VERSION This document describes version 0.001 of Eval::Util (from Perl distribution Eval-Util), released on 2018-03-05. SYNOPSIS use Eval::Util qw(inside_eval); eval { say "foo" if inside_eval() }; say "bar" if inside_eval(); # will print C but not C. DESCRIPTION FUNCTIONS None exported by default, but they are exportable. inside_eval Usage: inside_eval() => bool Will check if running code is inside eval() (either string eval or block eval). This is done via examining the stack trace and checking for frame with subroutine named "(eval)". HOMEPAGE Please visit the project's homepage at . SOURCE Source repository is at . BUGS Please report any bugs or feature requests on the bugtracker website When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. SEE ALSO "caller" in perlfunc AUTHOR perlancar COPYRIGHT AND LICENSE This software is copyright (c) 2018 by perlancar@cpan.org. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.