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.

29 lines
582 B

10 years ago
package Subtitle::BASE;
use strict;
use warnings;
use utf8;
sub log {
my ($self, $level, $msg) = @_;
if ($level eq 'error') {
push @{ $self->{log} }, "E: $msg";
} elsif ($level eq 'warn') {
push @{ $self->{log} }, "W: $msg";
} elsif ($level eq 'info') {
push @{ $self->{log} }, "I: $msg";
} elsif ($level eq 'debug') {
push @{ $self->{log} }, "D: $msg" if $self->{debug};
} else {
warn "Unknown loglevel $level of $msg\n";
10 years ago
}
return 1;
}
sub parse { return "Unimplemented by subclass"; }
sub build { return "Unimplemented by subclass"; }
10 years ago
1;