summaryrefslogtreecommitdiffstats
path: root/Net/IRC/EventQueue
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2014-04-23 18:36:38 +0400
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2014-04-23 18:36:38 +0400
commit87cf6352810c00952a79e58a1d418a28be01b33c (patch)
tree350ee3c59f8c1e69b642801b0561e2ad34bb44c9 /Net/IRC/EventQueue
parent534ca688d9c9c6ecd6584e53dca5cf0b3d996632 (diff)
Added Net-IRC to the repo
Diffstat (limited to 'Net/IRC/EventQueue')
-rw-r--r--Net/IRC/EventQueue/Entry.pm39
1 files changed, 39 insertions, 0 deletions
diff --git a/Net/IRC/EventQueue/Entry.pm b/Net/IRC/EventQueue/Entry.pm
new file mode 100644
index 0000000..4d75bd8
--- /dev/null
+++ b/Net/IRC/EventQueue/Entry.pm
@@ -0,0 +1,39 @@
+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;