Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-test
Commits
adb7fc07
Commit
adb7fc07
authored
Apr 21, 2017
by
Dan Staines
Browse files
added support for C-style multi-line comments
parent
0b051351
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
modules/Bio/EnsEMBL/Test/MultiTestDB.pm
modules/Bio/EnsEMBL/Test/MultiTestDB.pm
+16
-0
No files found.
modules/Bio/EnsEMBL/Test/MultiTestDB.pm
View file @
adb7fc07
...
...
@@ -434,7 +434,23 @@ sub load_sql {
$self
->
note
("
Reading SQL from '
$sql_file
'
");
work_with_file
(
$sql_file
,
'
r
',
sub
{
my
(
$fh
)
=
@_
;
my
$is_comment
=
0
;
while
(
my
$line
=
<
$fh
>
)
{
if
(
$is_comment
==
1
)
{
if
(
$line
=~
m/\*\//
)
{
$is_comment
=
0
;
}
next
;
}
if
(
$line
=~
m/\/\*/
)
{
if
(
$line
!~
m/\*\//
)
{
$is_comment
=
1
;
}
next
;
}
#ignore comments and white-space lines
if
(
$line
!~
/^#/
&&
$line
=~
/\S/
)
{
$sql_com
.=
$line
;
...
...
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