Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

arbenina
Copy link
Contributor

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.

@@ -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;
Copy link
Owner

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.

Copy link
Owner

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.

@arbenina
Copy link
Contributor Author

Please review my changes

@arbenina
Copy link
Contributor Author

Now config file should look like
group test {
.........................
}
debug 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants