3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-25 04:02:37 +01:00
pbot/PBot/IRC/EventQueue/Entry.pm
Pragmatic Software 5c4e10a35c Tidy things up
2020-02-15 14:38:32 -08:00

43 lines
647 B
Perl

package PBot::IRC::EventQueue::Entry; # pragma_ 2011/21/01
use strict;
use feature 'unicode_strings';
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;