You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
602 B

package Subtitle::Event;
use strict;
use warnings;
sub new {
my $class = shift;
my $self = {
start => 0.0,
end => 0.0,
text => '',
};
return bless($self, $class);
}
sub t_start {
my ($self, $t) = @_;
$self->{start} = $t
if defined $t and $t >= 0.0;
return $self->{start};
}
sub t_end {
my ($self, $t) = @_;
$self->{end} = $t
if defined $t and $t >= 0.0;
return $self->{end};
}
sub text {
my ($self, $t) = @_;
$self->{text} = $t
if defined $t;
return $self->{text};
}
1;
=pod
=head1 NAME
Subtitle::Event - base class for subtitle events
=cut