From 5805d3c2ba935ffb3d6fa0dc53ba5debe2536eda Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Tue, 12 Jan 2016 15:54:14 -0700 Subject: Added the ability to do connection debugging in Net::IRC without doing full-blown debugging, and made use of that feature in meta.pl. Also fixed the debugging output of Net::IRC to print to STDERR regardless of what debug method is used --- lib/Net/IRC.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/Net/IRC.pm') diff --git a/lib/Net/IRC.pm b/lib/Net/IRC.pm index d46ae9e..4b93fe1 100644 --- a/lib/Net/IRC.pm +++ b/lib/Net/IRC.pm @@ -43,6 +43,7 @@ sub new { '_connhash' => {}, '_error' => IO::Select->new(), '_debug' => 0, + '_debugsock' => 0, '_schedulequeue' => new Net::IRC::EventQueue(), '_outputqueue' => new Net::IRC::EventQueue(), '_read' => IO::Select->new(), @@ -115,6 +116,17 @@ sub debug { return $self->{_debug}; } +# Sets or returns the socket debugging flag for this object. +# Takes 1 optional arg: a new boolean value for the flag. +sub debugsock { + my $self = shift; + + if (@_) { + $self->{_debugsock} = $_[0]; + } + return $self->{_debugsock}; +} + # Goes through one iteration of the main event loop. Useful for integrating # other event-based systems (Tk, etc.) with Net::IRC. # Takes no args. -- cgit v1.2.3