New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behavior conditional on debugger is dangerous #11
Comments
I could remove the If there was another (safer) way to apply |
|
Closing this as I can see no solution to the "make_immutable" issue under the debugger :( Feel free to reopen if you have any better ideas. |
The issue with I've filed a PR to fix it: mauzo/B-Hooks-AtRuntime#1 |
Thank you! I'll reopen this ticket. |
I've upgraded to the latest |
I think having behavior change depending on if the debugger is in use is a terrible idea. It is a recipe for heisenbugs and confusion.
Being immutable can have an impact on many things that are not obvious, like when other modules play around with
@ISA
or modify your symbol table. The warning issued could also produce a tremendous amount of spam in a larger code base.Making
namespace::autoclean
conditional on the debugger is, I think, an even larger mistake. The extra subs will impact method resolution and leaving them in place could easily break classes.Both of these are exactly the type of thing you might want to explore in the debugger.
$^P
also can be used in cases other than using a full debugger.Devel::Confess
, for example, enables only the flags to give more descriptive names to anonymous subs and evals. When using a module likeDevel::Confess
that uses a limited set of debug flags, there would not be any benefit at all to disablingmake_immutable
andnamespace::autoclean
.The text was updated successfully, but these errors were encountered: