-
Notifications
You must be signed in to change notification settings - Fork 5
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
Data::Checks import
and unimport
should leave strict and warnings the hell alone
#37
Comments
@tobyink how it should behave with:
|
In answer to your example: no strict;
no warnings;
use Data::Checks;
{
no Data::Checks;
# There should be no strict or warnings here, because
# the code above says `no strict` and `no warnings`.
} Enabling |
thanks for clarification (I cannot agree more) ... only wish for Perl itself to allow current implementation and proper unimport |
@tobyink I'm sorry I didn't respond sooner. I've had other issues I've had to deal with. You say that The point of checks is to make it easier to write correct code and disabling |
I thought the example I provided made things clear why. use strict;
use warnings;
use Data::Checks;
{
no Data::Checks;
# In this scope, strict and warnings are DISABLED!
# I never asked for them to be disabled.
# Data::Checks->unimport disabled them for me!
# This is incredibly unintuitive.
} As you mentioned, |
(Deleted previous comment because I had names backwards) @tobyink I see your point now. You're absolutely right. If you or someone else would like to provide a PR, I'd be happy to review! |
https://github.com/Perl-Oshun/oshun/blob/66eb75e20079881d9fb96ef774ef2e69858c911b/lib/Data/Checks.pm#L30
Consider:
The text was updated successfully, but these errors were encountered: