-
Notifications
You must be signed in to change notification settings - Fork 33
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
add new basic00 implementation #1040
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general this looks good to me but I have a bunch of comments.
b577b68
to
cb40bd8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add POD documentation of all methods that explains what they do (what they are supposed to do), what the expected input is and what the output will be.
I have added the NFC conversion tests and updated the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine. I have not run any tests on it though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested and it works as expected.
One thing though, overall I think the code could benefit from an editorial pass on the spacing in every conditional blocks (e.g. if ( ... )
everywhere) to improve readability but I won't be blocking the PR if it is not done.
|
||
=item string | ||
|
||
Returns a string representation of the error object, equivalent to message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error object, equivalent to message. -> error object. Equivalent to message().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
=item tag | ||
|
||
Returns the message tag asscociated to the error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asscociated -> associated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
use Readonly; | ||
use Try::Tiny; | ||
use Zonemaster::LDNS; | ||
use Data::Dumper; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be safely removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One typo else ready to approve
@@ -129,7 +129,7 @@ sub tag { | |||
|
|||
=item string | |||
|
|||
Returns a string representation of the error object, equivalent to message. | |||
Returns a string representation of the error object. Euivalent to message(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Euivalent -> Equivalent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Updated by #1157 |
Purpose
Implement new Basic00. I implemented the updated "test case" as sanitization methods, it is not used anywhere yet, I am waiting for design validation before using it.
Context
zonemaster/zonemaster#942
Changes
Zonemaster::Engine::Normalization::normalize_name
that follow the procedure described in RequirementsAndNormalizationOfDomainNames.Zonemaster::Engine::Normalization::Errors
. Those have a tag and a localized error message (translated when called to allow changes of the locale between calls)How to test this PR