From a62709dab1b9202d1add32a2e29e54f5ade35ebc Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Thu, 1 Sep 2011 13:14:43 +0300 Subject: [PATCH] Rename title variable --- bin/gcap | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/gcap b/bin/gcap index ca82edf..28a3676 100755 --- a/bin/gcap +++ b/bin/gcap @@ -31,7 +31,6 @@ use Getopt::ArgvFile(home => 1, startupFilename => [qw(.gcaprc)]); use Getopt::Long qw(:config bundling); my %config; -my $video_title; exit main(); @@ -111,6 +110,7 @@ sub print_help } my @captions; +my $title; sub main { @@ -210,10 +210,10 @@ sub main my $fname = sprintf "%s_%s.srt", $v, $_->{lang_code}; - if ($video_title) + if ($title) { - $video_title = apply_regexp($config{regexp}, $video_title); - $fname = sprintf "%s_%s.srt", $video_title, $_->{lang_code}; + $title = apply_regexp($config{regexp}, $title); + $fname = sprintf "%s_%s.srt", $title, $_->{lang_code}; } open my $fh, ">", $fname or die "$fname: $!\n"; @@ -357,10 +357,9 @@ sub get_title { print STDERR "done.\n" unless $config{quiet}; require Encode; - $video_title = trim(Encode::decode_utf8($q->param('title'))); + $title = trim(Encode::decode_utf8($q->param('title'))); } - - $video_title; + $title; } sub apply_regexp -- 2.11.4.GIT