|
|
@ -45,15 +45,17 @@ my %FIELDS = ( |
|
|
|
encoding => { type => 'd', value => 204, name => 'Encoding' }, |
|
|
|
encoding => { type => 'd', value => 204, name => 'Encoding' }, |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# options: |
|
|
|
|
|
|
|
# * version - 'ssa' for v4 or 'ass' for v4+ |
|
|
|
sub new { |
|
|
|
sub new { |
|
|
|
my ($class, %opts) = @_; |
|
|
|
my ($class, %opts) = @_; |
|
|
|
my $self = {}; |
|
|
|
my $self = { |
|
|
|
|
|
|
|
_vers => 'ass', |
|
|
|
|
|
|
|
}; |
|
|
|
bless($self, $class); |
|
|
|
bless($self, $class); |
|
|
|
|
|
|
|
|
|
|
|
if ($opts{version} and $opts{version} =~ m{^(ass|ssa)$}oi) { |
|
|
|
if ($opts{version} and $opts{version} =~ m{^(ass|ssa)$}oi) { |
|
|
|
$self->{_vers} = lc($opts{version}); |
|
|
|
$self->{_vers} = lc($opts{version}); |
|
|
|
} else { |
|
|
|
|
|
|
|
$self->{_vers} = 'ass'; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
my @fields = $self->fields(); |
|
|
|
my @fields = $self->fields(); |
|
|
|