aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNigel Taylor <njtaylor0101@gmail.com>2013-01-06 17:23:03 +0000
committerNigel Taylor <njtaylor0101@gmail.com>2013-01-06 17:23:03 +0000
commit1581be7c603b8b7319b708b277940eb74d1f3aa6 (patch)
tree7d099f0a727f3b53cabd4ea4637dc7251f426e37
parent6c914fb45d7b410e95c9e00185c61176d3d054fc (diff)
downloadget-flash-videos-1581be7c603b8b7319b708b277940eb74d1f3aa6.tar.gz
On some versions of perl get_flash_videos version is not displayed
as constants are evaulated at compile time runtime variables have no value.
-rwxr-xr-xget_flash_videos11
1 files changed, 6 insertions, 5 deletions
diff --git a/get_flash_videos b/get_flash_videos
index be99515..5378883 100755
--- a/get_flash_videos
+++ b/get_flash_videos
@@ -47,8 +47,9 @@ use FlashVideo::VideoPreferences;
unshift @INC, \&plugin_loader;
-our $VERSION = "1.25";
-
+use constant CVERSION => "1.25";
+our $VERSION = CVERSION;
+
our %opt;
BEGIN {
my $player = "mplayer -really-quiet";
@@ -84,9 +85,9 @@ BEGIN {
);
}
-use constant VER_INFO => <<EOF;
-get_flash_videos version $VERSION (http://code.google.com/p/get-flash-videos/)
-EOF
+# constant evaluated at compile time, can't use runtime variables.
+use constant VER_INFO =>
+ "get_flash_videos version " . CVERSION . " (http://code.google.com/p/get-flash-videos/)\n";
use constant USAGE => VER_INFO . <<EOF;