Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
04b3e6fc
Commit
04b3e6fc
authored
Jan 07, 2015
by
Matthieu Muffato
Browse files
don't mix missing and incomplete options in the report
parent
389911cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
modules/Bio/EnsEMBL/Hive/DependentOptions.pm
modules/Bio/EnsEMBL/Hive/DependentOptions.pm
+11
-4
No files found.
modules/Bio/EnsEMBL/Hive/DependentOptions.pm
View file @
04b3e6fc
...
...
@@ -129,7 +129,8 @@ sub hash_leaves {
$self
->
hash_leaves
(
$hash_to
,
$element
,
$array_element_prefix
);
}
}
elsif
(
!
$self
->
is_fully_substituted_string
(
$source
))
{
$hash_to
->
{
$prefix
}
=
1
;
$source
=~
m/#\:subst (.+?)\:#/
;
$hash_to
->
{
$prefix
}
=
$prefix
=~
/'$1'/
?
undef
:
$
1
;
}
return
$hash_to
;
...
...
@@ -252,9 +253,15 @@ sub process_options {
my
$missing_options
=
$self
->
hash_leaves
(
{},
$self
->
root
,
''
);
if
(
scalar
(
keys
%$missing_options
))
{
warn
"
Missing or incomplete definition of the following options:
\n
";
foreach
my
$key
(
sort
keys
%$missing_options
)
{
print
"
\t
$key
\n
";
my
@missing_keys
=
grep
{
!
defined
$missing_options
->
{
$_
}}
(
keys
%$missing_options
);
my
@incomplete_keys
=
grep
{
defined
$missing_options
->
{
$_
}}
(
keys
%$missing_options
);
if
(
@missing_keys
)
{
warn
"
The following options are missing:
\n
";
print
"
\t
$_
\n
"
for
@missing_keys
;
}
if
(
@incomplete_keys
)
{
warn
"
The following options are incomplete:
\n
";
print
"
\t
$_
needs '
"
.
(
$missing_options
->
{
$_
})
.
"
'
\n
"
for
@incomplete_keys
;
}
exit
(
1
);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment