From 25caaab39b7b6a4493f1bc0bac38506aa8e9509a Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Thu, 30 Jun 2016 13:56:08 +1000 Subject: [PATCH] * Subtitle::SSA::Style : rename variable --- lib/Subtitle/SSA/Style.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Subtitle/SSA/Style.pm b/lib/Subtitle/SSA/Style.pm index 7947a75..5330d38 100644 --- a/lib/Subtitle/SSA/Style.pm +++ b/lib/Subtitle/SSA/Style.pm @@ -11,7 +11,7 @@ use overload => ( my @FIELDS_SSA = qw(name fontname fontsize primarycolour secondarycolour outlinecolour backcolour bold italic underline strikeout scalex scaley spacing angle borderstyle outline shadow alignment marginl marginr marginv encoding); # FIXME: copypaste my @FIELDS_ASS = qw(name fontname fontsize primarycolour secondarycolour outlinecolour backcolour bold italic underline strikeout scalex scaley spacing angle borderstyle outline shadow alignment marginl marginr marginv encoding); -my %STYLE_DEFAULTS = ( +my %FIELDS = ( # format: string name => { type => 's', value => 'Default', name => 'Name' }, fontname => { type => 's', value => 'Arial' , name => 'Fontname' }, @@ -54,7 +54,7 @@ sub new { my @fields = $self->fields(); foreach my $field (@fields) { $self->{$field} = ($opts{defaults}) - ? $STYLE_DEFAULTS{$field}->{value} + ? $FIELDS{$field}->{value} : undef; } @@ -103,7 +103,7 @@ sub to_string { my $string = "Style: "; my @values = (); foreach my $field (@fields) { - my $d = $STYLE_DEFAULTS{$field}; + my $d = $FIELD{$field}; my $v = $self->{$f} // $d->{value}; if ($d->{type} eq 'x') { $fmt = ($self->{_vers} eq 'ass') ? '&H%08X' : '%d';