[SCM] Packaging of Net::Citadel in Debian branch, master, updated. debian/0.16-1-45-gd21e85b

Robert James Clay jame at rocasa.us
Wed Jun 5 17:20:40 UTC 2013


The following commit has been merged in the master branch:
commit cbcf45d5dcbdcf9df080bc3a3287bf0c74a858f0
Author: Robert James Clay <jame at rocasa.us>
Date:   Sun Oct 21 12:56:45 2012 -0400

    Add citadel_info function to lib/Net/Citadel.pm

diff --git a/lib/Net/Citadel.pm b/lib/Net/Citadel.pm
index b772587..72b539f 100644
--- a/lib/Net/Citadel.pm
+++ b/lib/Net/Citadel.pm
@@ -717,6 +717,35 @@ sub citadel_echo {
     return 1;
 }
 
+=item I<citadel_info>
+
+$ctdl_inforef = I<$c>->citadel_info()
+
+Sends an INFO command to the Citadel server and returns the lines it receives
+from that as a reference to an array.
+
+=cut
+
+sub citadel_info {
+    my $self = shift;
+    my $msg  = shift;
+    my $s    = $self->{socket};
+    my ( @info, $line );
+
+    print $s "INFO\n";
+
+    if ((<$s>) !~ /1../) croak "Incorrect response from Citadel INFO command.";
+
+    while ($line = <$s>) {
+        if ( $line !~ /^000/ ) {
+            push @info $line;
+        }
+        else { last; }
+    }
+
+    return \@info;
+}
+
 =pod
 
 =item I<citadel_time>

-- 
Packaging of Net::Citadel in Debian



More information about the Pkg-perl-cvs-commits mailing list