-
Notifications
You must be signed in to change notification settings - Fork 9
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
Added debug mode #17
base: master
Are you sure you want to change the base?
Added debug mode #17
Conversation
@@ -61,6 +61,20 @@ sub display_help { | |||
print "If you are running this you had better be John 'Warthog9' Hawley\n"; | |||
} | |||
|
|||
sub debug_mode { | |||
require File::Find::Rule; |
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.
I think instead of running through the files and modifying the variable, you may want to set this up as a config file style option. If it's defined in the config file debug = OR --debug is set, specifically set something in $config to indicate that debugging output should be turned on. Since $config gets passed around that should work out fine, and should be more robust than your find and mapping you are doing here.
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.
Noting that you'll also have to modify the yacc and regenerate the lexer and parser to add a config file option. That should likely be done as a separate commit.
Please review my changes |
Now config file should look like |
SyncDiff wrote a lot of additional information. So, I decided to create a debug mode.
At first it's a simple DEBUG flag, but it could be expand to work with log files and so on in future.