2020-02-15 23:38:32 +01:00
|
|
|
package PBot::IRC::EventQueue::Entry; # pragma_ 2011/21/01
|
2019-06-26 18:34:19 +02:00
|
|
|
|
2011-01-22 09:35:31 +01:00
|
|
|
use strict;
|
2019-06-26 18:34:19 +02:00
|
|
|
|
2019-07-11 03:40:53 +02:00
|
|
|
use feature 'unicode_strings';
|
2021-06-07 04:12:14 +02:00
|
|
|
use utf8;
|
2019-07-11 03:40:53 +02:00
|
|
|
|
2011-01-22 09:35:31 +01:00
|
|
|
my $id = 0;
|
2019-06-26 18:34:19 +02:00
|
|
|
|
2011-01-22 09:35:31 +01:00
|
|
|
sub new {
|
2020-02-15 23:38:32 +01:00
|
|
|
my $class = shift;
|
|
|
|
my $time = shift;
|
|
|
|
my $content = shift;
|
|
|
|
|
|
|
|
my $self = {
|
|
|
|
'time' => $time,
|
|
|
|
'content' => $content,
|
|
|
|
'id' => "$time:" . $id++,
|
|
|
|
};
|
|
|
|
|
|
|
|
bless $self, $class;
|
|
|
|
return $self;
|
2011-01-22 09:35:31 +01:00
|
|
|
}
|
2019-06-26 18:34:19 +02:00
|
|
|
|
2011-01-22 09:35:31 +01:00
|
|
|
sub id {
|
2020-02-15 23:38:32 +01:00
|
|
|
my $self = shift;
|
|
|
|
return $self->{'id'};
|
2011-01-22 09:35:31 +01:00
|
|
|
}
|
2019-06-26 18:34:19 +02:00
|
|
|
|
2011-01-22 09:35:31 +01:00
|
|
|
sub time {
|
2020-02-15 23:38:32 +01:00
|
|
|
my $self = shift;
|
|
|
|
$self->{'time'} = $_[0] if @_;
|
|
|
|
return $self->{'time'};
|
2011-01-22 09:35:31 +01:00
|
|
|
}
|
2019-06-26 18:34:19 +02:00
|
|
|
|
2011-01-22 09:35:31 +01:00
|
|
|
sub content {
|
2020-02-15 23:38:32 +01:00
|
|
|
my $self = shift;
|
|
|
|
$self->{'content'} = $_[0] if @_;
|
|
|
|
return $self->{'content'};
|
2011-01-22 09:35:31 +01:00
|
|
|
}
|
2019-06-26 18:34:19 +02:00
|
|
|
|
2011-01-22 09:35:31 +01:00
|
|
|
1;
|
|
|
|
|