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

Application: support -cfgfile besides --cfgfile (like Appconfig would) #112

Merged

Conversation

stdweird
Copy link
Member

Fixes #113

@stdweird stdweird added this to the 15.8 milestone Sep 29, 2015
@stdweird stdweird force-pushed the Application_handle_single_dash_cfgfile branch from f303a37 to 7a28f61 Compare September 29, 2015 22:28
@@ -61,6 +61,16 @@ is($newapp->option($OPTION_CFGFILE), $cfgfile,
is($newapp->option('myoption'), $value,
"myoption value from configfile");

# 1st format short -cfgile path/tofile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-cfgfile

@stdweird stdweird force-pushed the Application_handle_single_dash_cfgfile branch from 7a28f61 to 1e1c5a4 Compare October 1, 2015 05:46
@stdweird
Copy link
Member Author

stdweird commented Oct 1, 2015

@jrha typos fixed

# 2nd format --cfgile=path/to/file
$configfile = $1 if ($arg =~ m/$cfgfile_value_pattern/);
if ($arg =~ m/$cfgfile_value_pattern/) {
if(defined($1)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace between if and ().

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, even easier, why don't you just split by the = sign?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how will it be easier? will still need the regexp i think

@stdweird stdweird force-pushed the Application_handle_single_dash_cfgfile branch from 1e1c5a4 to 92a985b Compare October 1, 2015 10:01
piojo-zz pushed a commit that referenced this pull request Oct 1, 2015
…cfgfile

CAF::Application: support -cfgfile besides --cfgfile (like Appconfig would)
@piojo-zz piojo-zz merged commit 1d1b1fc into quattor:master Oct 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants