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
zircon
Commits
330bdef9
Commit
330bdef9
authored
Apr 12, 2019
by
Thibaut Hourlier
Browse files
Test if the object is defined before returning values
parent
d5c25b3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
bin/zircon_pipe
bin/zircon_pipe
+10
-4
t/timestamp.t
t/timestamp.t
+3
-0
No files found.
bin/zircon_pipe
View file @
330bdef9
...
...
@@ -3,6 +3,7 @@
use
strict
;
use
warnings
;
use
Carp
;
use
IO
::
Handle
;
use
Getopt
::
Long
;
use
Tk
;
...
...
@@ -129,8 +130,10 @@ sub zconn {
($
self
->{
zconn
})
=
@
arg
;
$
self
->
try_send
;
#
may
have
been
postponed
due
to
lack
of
zconn
}
return
$
self
->{
zconn
}
||
die
"Need zconn set now"
;
if
(
!$self->{zconn}) {
confess
"Need zconn set now"
;
}
return
$
self
->{
zconn
};
}
...
...
@@ -261,8 +264,11 @@ sub new {
sub
zconn
{
my
($
self
,
@
arg
)
=
@
_
;
($
self
->{
zconn
})
=
@
arg
if
@
arg
;
return
$
self
->{
zconn
}
||
die
"Need zconn set now"
;
if
(
!$self->{zconn}) {
confess
"Need zconn set now"
;
}
return
$
self
->{
zconn
};
}
sub
on_timeout
{
...
...
t/timestamp.t
View file @
330bdef9
...
...
@@ -19,6 +19,7 @@ sub main {
plan
tests
=>
7
;
my
$handler
=
do_init
();
# hold the ref to prevent garbage collection
print
STDERR
"
AARRRGGG
\n
";
MainLoop
();
return
0
;
...
...
@@ -31,9 +32,11 @@ sub do_init {
$M
->
clip_ids
(
@id
);
$M
->
after
(
10000
,
sub
{
fail
("
whole-test timeout
");
$M
->
destroy
});
print
STDERR
"
GGG
\n
";
my
$handler
=
init_zircon_conn
(
$M
,
@id
);
$M
->
state_bump
(
new
=>
@id
);
print
STDERR
"
RRRGGG
\n
";
return
$handler
;
}
...
...
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