summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Net/Flowdock/Stream.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Net/Flowdock/Stream.pm b/lib/Net/Flowdock/Stream.pm
index 23db07d..7b7603d 100644
--- a/lib/Net/Flowdock/Stream.pm
+++ b/lib/Net/Flowdock/Stream.pm
@@ -35,6 +35,12 @@ has socket_timeout => (
default => 0.01,
);
+has debug => (
+ is => 'rw',
+ isa => 'Bool',
+ default => 0,
+);
+
has _socket => (
is => 'rw',
isa => 'Net::HTTPS::NB',
@@ -135,6 +141,7 @@ sub _process_readbuf {
if ((my $buf = $self->_readbuf) =~ s/^([^\x0d]*)\x0d//) {
my $chunk = $1;
$self->_readbuf($buf);
+ warn "New event:\n$chunk" if $self->debug;
return decode_json($chunk);
}