summaryrefslogtreecommitdiff
path: root/modules/Version.pm
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2004-05-24 12:40:29 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2004-05-24 12:40:29 +0000
commitca966244d0a44993c7e98bcd51e4a9b78d9b3b5d (patch)
tree5e25d80f0562fb7426622d6ea48711ca86d6cd2d /modules/Version.pm
parent2cb48b5c2de8a6abf41bcb34e376cf6a22695e31 (diff)
downloadMPC-ca966244d0a44993c7e98bcd51e4a9b78d9b3b5d.tar.gz
ChangeLogTag: Mon May 24 07:35:39 2004 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/Version.pm')
-rw-r--r--modules/Version.pm49
1 files changed, 27 insertions, 22 deletions
diff --git a/modules/Version.pm b/modules/Version.pm
index f1a9b4f5..4a5b275f 100644
--- a/modules/Version.pm
+++ b/modules/Version.pm
@@ -18,34 +18,39 @@ use strict;
## This is the starting major and minor version
my($version) = '3.1';
-
-## Here we determine the beta version. The base variable
-## is the negated number of existing ChangeLog entries at the
-## time of the release of the major and minor version. We then
-## add the total number of ChangeLog entries to the base to
-## get the beta version.
-my($base) = -36;
-if (open(CLH, ::getBasePath() . '/ChangeLog')) {
- while(<CLH>) {
- if (/^\w\w\w\s/) {
- ++$base;
- }
- }
- close(CLH);
-
- ## We then append the beta version number to the version string
- $version .= ".$base";
-}
-else {
- print "WARNING: Unable to determine the beta version number of MPC\n";
-}
-
+my($once) = 1;
# ************************************************************
# Subroutine Section
# ************************************************************
sub get {
+ if ($once) {
+ ## We only need to do this once
+ $once = 0;
+
+ ## Here we determine the beta version. The base variable
+ ## is the negated number of existing ChangeLog entries at the
+ ## time of the release of the major and minor version. We then
+ ## add the total number of ChangeLog entries to the base to
+ ## get the beta version.
+ my($base) = -36;
+ if (open(CLH, ::getBasePath() . '/ChangeLog')) {
+ while(<CLH>) {
+ if (/^\w\w\w\s/) {
+ ++$base;
+ }
+ }
+ close(CLH);
+
+ ## We then append the beta version number to the version string
+ $version .= ".$base";
+ }
+ else {
+ print "WARNING: Unable to determine the beta version number of MPC\n";
+ }
+ }
+
return $version;
}