-
Notifications
You must be signed in to change notification settings - Fork 14
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
Rule based editor #151
Rule based editor #151
Conversation
PR now complete. Constant names for defining line formats have been made independent of their original use case... Comments welcome! |
9ff3c2c
to
941a5f1
Compare
After thinking a bit more about it, I saw no good reason to have it as a module included by |
Fixes #123 (I think it covers what was discussed). |
# ${build-info} | ||
# | ||
# | ||
# This module implements a rule-based editor that is used to modify the content |
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.
use pod style 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.
ah, if this is the same text as uunder the head1 DESCRIPTION
, please remove it here
# If the keyword was "negated", remove (comment out) configuration line if present and enabled | ||
if ($comment_line) { | ||
*$self->{LOG}->debug(1, "$function_name: keyword '$keyword' negated, removing configuration line"); | ||
$self->_commentConfigLine($keyword, $line_fmt); |
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.
handle undef return value (here and below)
@jouvin i made some more remarks, but nothing major. should be ready to merge |
I think I addressed everything! I'm about to squash the last commits. |
- Also add handling of undef return value by some methods after an internal error
Squash done |
|
||
Defines the format used to represent the keyword/value pair. Several format are supported covering | ||
the most usual ones (SH shell script, Apache, ...). For the exact list, see the definition of | ||
LINE_FORMAT_xxx constants and the associated documnetation below. |
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.
documentation typo
@jouvin some typo's but otherwise good to go (you can safely ignore my ranting about unescape 😉 ) |
No you are right I missed that |
- Also includes some code reformatting
@stdweird is the new comment better? |
Note that the debug info printed should help identify the problem in the unlikely event it occurs... |
No comments from me! Great to see this additional functionality. :-) |
This PR imports into
CAF
the rule-based file editor originally developed as part ofncm-dpmlfc
andncm-xrootd
. It intends to address #123.I'll try to complete the import and constant name cleanup during the week-end. I'd appreciate if this code could go into 16.4 release to help further developments, in particular its use in
ncm-dpmlfc
andncm-xrootd
. Except if I missed something, it should have no impact on current FileEditor usage as it just adds new methods but don't change anything in the existing code (apart including the module containing the new code).