-
-
Save typester/3808409 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/UV.pm b/lib/UV.pm | |
index f69c916..38e8e3a 100644 | |
--- a/lib/UV.pm | |
+++ b/lib/UV.pm | |
@@ -6,6 +6,9 @@ our $VERSION = '0.1'; | |
XSLoader::load __PACKAGE__, $VERSION; | |
+use constant READABLE => 1; | |
+use constant WRITABLE => 2; | |
+ | |
1; | |
__END__ | |
diff --git a/t/handles.t b/t/handles.t | |
index 8808c0d..3f250f8 100644 | |
--- a/t/handles.t | |
+++ b/t/handles.t | |
@@ -26,10 +26,12 @@ use UV; | |
my $timeout_timer = UV::timer_init(); | |
UV::timer_start($timeout_timer, 200, 0, sub { | |
UV::close($count_timer); | |
+ UV::close($timeout_timer); | |
}); | |
UV::run(); | |
+ is scalar(@{UV::handles()}), 0; | |
is scalar(@{$handles}), 2; | |
is scalar(@{$handles->[0]}), 4; | |
is_deeply $handles->[0]->[0], { ref => 1, active => 1, type => UV::TIMER(), closing => 0 }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment