diff --git a/Changes b/Changes index c2fc4fd..e49233c 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +1.2020: Mon Feb 07 2011 + - Andrzej Adam Filip requested a CLOSE method for ::PipeSocket + 1.2019: Wed Dec 01 2010 - _process_flags() was a little too aggressive about what's a valid flag and what isn't. Really, it needs to be up to the diff --git a/Simple.pm b/Simple.pm index 100b77a..f63db15 100644 --- a/Simple.pm +++ b/Simple.pm @@ -9,7 +9,7 @@ use IO::Socket; use IO::Select; use Net::IMAP::Simple::PipeSocket; -our $VERSION = "1.2019"; +our $VERSION = "1.2020"; BEGIN { # I'd really rather the pause/cpan indexers miss this "package" diff --git a/lib/Net/IMAP/Simple/PipeSocket.pm b/lib/Net/IMAP/Simple/PipeSocket.pm index 6416397..de0ad50 100644 --- a/lib/Net/IMAP/Simple/PipeSocket.pm +++ b/lib/Net/IMAP/Simple/PipeSocket.pm @@ -104,6 +104,17 @@ sub _waitpid { return; } +sub CLOSE { + my $this = shift; + my $rdr = $this->{rdr}; + my $wtr = $this->{wtr}; + + close $rdr or warn "PIPE ERR (close-r): $!"; + close $wtr or warn "PIPE ERR (close-w): $!"; + + return; +} + 1; __END__