r49043 - in /branches/upstream/libnet-irc-perl/current: Changes Entry.pm EventQueue.pm IRC.pm MANIFEST MANIFEST.SKIP META.yml Makefile.PL TODO t/ t/01_minimal.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Mon Dec 21 02:42:58 UTC 2009


Author: jawnsy-guest
Date: Mon Dec 21 02:42:45 2009
New Revision: 49043

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=49043
Log:
[svn-upgrade] Integrating new upstream version, libnet-irc-perl (0.77)

Added:
    branches/upstream/libnet-irc-perl/current/Entry.pm
    branches/upstream/libnet-irc-perl/current/EventQueue.pm
    branches/upstream/libnet-irc-perl/current/t/
    branches/upstream/libnet-irc-perl/current/t/01_minimal.t
Removed:
    branches/upstream/libnet-irc-perl/current/TODO
Modified:
    branches/upstream/libnet-irc-perl/current/Changes
    branches/upstream/libnet-irc-perl/current/IRC.pm
    branches/upstream/libnet-irc-perl/current/MANIFEST
    branches/upstream/libnet-irc-perl/current/MANIFEST.SKIP
    branches/upstream/libnet-irc-perl/current/META.yml
    branches/upstream/libnet-irc-perl/current/Makefile.PL

Modified: branches/upstream/libnet-irc-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-irc-perl/current/Changes?rev=49043&op=diff
==============================================================================
--- branches/upstream/libnet-irc-perl/current/Changes (original)
+++ branches/upstream/libnet-irc-perl/current/Changes Mon Dec 21 02:42:45 2009
@@ -413,3 +413,9 @@
 
 0.76  Thu Sep 17 23:47:13 EDT 2009
   - Officially deprecated. See Bot::BasicBot and POE::Component::IRC instead.
+
+0.77  Sat Dec 19 17:46:07 EST 2009
+  - Previous maintainer needs to learn how the dist tools work and include
+    everything in the manifest. New version to include everything in the old
+    tarball and make people stop harassing me about this long-dead (good
+    riddance) distribution once and for all.

Added: branches/upstream/libnet-irc-perl/current/Entry.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-irc-perl/current/Entry.pm?rev=49043&op=file
==============================================================================
--- branches/upstream/libnet-irc-perl/current/Entry.pm (added)
+++ branches/upstream/libnet-irc-perl/current/Entry.pm Mon Dec 21 02:42:45 2009
@@ -1,0 +1,40 @@
+package Net::IRC::EventQueue::Entry;
+                                                                                                                                     
+use strict;
+                                                                                                                                     
+my $id = 0;
+                                                                                                                                     
+sub new {
+  my $class = shift;
+  my $time = shift;
+  my $content = shift;
+                                                                                                                                     
+  my $self = {
+    'time'  => $time,
+    'content' => $content,
+    'id'    => "$time:" . $id++,
+  };
+                                                                                                                                     
+  bless $self, $class;
+  return $self;
+}
+                                                                                                                                     
+sub id {
+  my $self = shift;
+  return $self->{'id'};
+}
+                                                                                                                                     
+sub time {
+  my $self = shift;
+  $self->{'time'} = $_[0] if @_;
+  return $self->{'time'};
+}
+                                                                                                                                     
+sub content {
+  my $self = shift;
+  $self->{'content'} = $_[0] if @_;
+  return $self->{'content'};
+}
+                                                                                                                                     
+1;
+

Added: branches/upstream/libnet-irc-perl/current/EventQueue.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-irc-perl/current/EventQueue.pm?rev=49043&op=file
==============================================================================
--- branches/upstream/libnet-irc-perl/current/EventQueue.pm (added)
+++ branches/upstream/libnet-irc-perl/current/EventQueue.pm Mon Dec 21 02:42:45 2009
@@ -1,0 +1,73 @@
+package Net::IRC::EventQueue;
+
+use Net::IRC::EventQueue::Entry;
+
+use strict;
+
+sub new {
+  my $class = shift;
+  
+  my $self = {
+    'queue' => {},
+  };
+
+  bless $self, $class;
+}
+
+sub queue {
+  my $self = shift;
+  return $self->{'queue'};
+}
+
+sub enqueue {
+  my $self = shift;
+  my $time = shift;
+  my $content = shift;
+
+  my $entry = new Net::IRC::EventQueue::Entry($time, $content);
+  $self->queue->{$entry->id} = $entry;
+  return $entry->id;
+}
+
+sub dequeue {
+  my $self = shift;
+  my $event = shift;
+  my $result;
+
+  if(!$event) { # we got passed nothing, so return the first event
+    $event = $self->head();
+    delete $self->queue->{$event->id};
+    $result = $event;
+  } elsif(!ref($event)) { # we got passed an id
+    $result = $self->queue->{$event};
+    delete $self->queue->{$event};
+  } else { # we got passed an actual event object
+    ref($event) eq 'Net::IRC::EventQueue::Entry'
+        or die "Cannot delete event type of " . ref($event) . "!";
+
+    $result = $self->queue->{$event->id};
+    delete $self->queue->{$event->id};
+  }
+
+  return $result;
+}
+
+sub head {
+  my $self = shift;
+
+  return undef if $self->is_empty;
+ 
+  no warnings; # because we want to numerically sort strings...
+  my $headkey = (sort {$a <=> $b} (keys(%{$self->queue})))[0];
+  use warnings;
+
+  return $self->queue->{$headkey};
+}
+
+sub is_empty {
+  my $self = shift;
+
+  return keys(%{$self->queue}) ? 0 : 1;
+}
+
+1;

Modified: branches/upstream/libnet-irc-perl/current/IRC.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-irc-perl/current/IRC.pm?rev=49043&op=diff
==============================================================================
--- branches/upstream/libnet-irc-perl/current/IRC.pm (original)
+++ branches/upstream/libnet-irc-perl/current/IRC.pm Mon Dec 21 02:42:45 2009
@@ -33,7 +33,7 @@
 use strict;
 use vars qw($VERSION);
 
-$VERSION = "0.76";
+$VERSION = "0.77";
 
 sub new {
   my $proto = shift;

Modified: branches/upstream/libnet-irc-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-irc-perl/current/MANIFEST?rev=49043&op=diff
==============================================================================
--- branches/upstream/libnet-irc-perl/current/MANIFEST (original)
+++ branches/upstream/libnet-irc-perl/current/MANIFEST Mon Dec 21 02:42:45 2009
@@ -1,13 +1,14 @@
 Changes
 Connection.pm
 DCC.pm
+Entry.pm
 Event.pm
+EventQueue.pm
 IRC.pm
 irctest
+Makefile.PL
 MANIFEST
 MANIFEST.SKIP
-Makefile.PL
 README
-TODO
-
+t/01_minimal.t
 META.yml                                 Module meta-data (added by MakeMaker)

Modified: branches/upstream/libnet-irc-perl/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-irc-perl/current/MANIFEST.SKIP?rev=49043&op=diff
==============================================================================
--- branches/upstream/libnet-irc-perl/current/MANIFEST.SKIP (original)
+++ branches/upstream/libnet-irc-perl/current/MANIFEST.SKIP Mon Dec 21 02:42:45 2009
@@ -1,3 +1,4 @@
 TODO$
 Makefile$
 ^CVS
+^.git

Modified: branches/upstream/libnet-irc-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-irc-perl/current/META.yml?rev=49043&op=diff
==============================================================================
--- branches/upstream/libnet-irc-perl/current/META.yml (original)
+++ branches/upstream/libnet-irc-perl/current/META.yml Mon Dec 21 02:42:45 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Net-IRC
-version:            0.76
+version:            0.77
 abstract:           ~
 author:  []
 license:            unknown

Modified: branches/upstream/libnet-irc-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-irc-perl/current/Makefile.PL?rev=49043&op=diff
==============================================================================
--- branches/upstream/libnet-irc-perl/current/Makefile.PL (original)
+++ branches/upstream/libnet-irc-perl/current/Makefile.PL Mon Dec 21 02:42:45 2009
@@ -1,4 +1,4 @@
-
+# Net::IRC sucks
 use ExtUtils::MakeMaker;
 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
 # the contents of the Makefile that is written.

Added: branches/upstream/libnet-irc-perl/current/t/01_minimal.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-irc-perl/current/t/01_minimal.t?rev=49043&op=file
==============================================================================
--- branches/upstream/libnet-irc-perl/current/t/01_minimal.t (added)
+++ branches/upstream/libnet-irc-perl/current/t/01_minimal.t Mon Dec 21 02:42:45 2009
@@ -1,0 +1,12 @@
+use strict;
+use Test;
+
+BEGIN { plan tests => 3 };
+
+ok(eval { require Net::IRC; });
+
+use Net::IRC;
+ok(1);
+
+my $irc = Net::IRC->new;
+ok($irc);




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