2010-06-05 06:34:14 +02:00
|
|
|
# File: VERSION.pm
|
|
|
|
# Author: pragma_
|
|
|
|
#
|
|
|
|
# Purpose: Keeps track of bot version.
|
|
|
|
|
2017-03-05 22:33:31 +01:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2010-06-05 06:34:14 +02:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
package PBot::VERSION;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
2019-07-11 03:40:53 +02:00
|
|
|
use feature 'unicode_strings';
|
|
|
|
|
2018-01-23 08:48:25 +01:00
|
|
|
BEGIN {
|
|
|
|
use Exporter;
|
|
|
|
our @ISA = 'Exporter';
|
|
|
|
our @EXPORT_OK = qw(version);
|
|
|
|
}
|
|
|
|
|
2010-06-05 06:34:14 +02:00
|
|
|
# These are set automatically by the build/commit script
|
|
|
|
use constant {
|
|
|
|
BUILD_NAME => "PBot",
|
2019-12-29 07:58:28 +01:00
|
|
|
BUILD_REVISION => 2623,
|
|
|
|
BUILD_DATE => "2019-12-28",
|
2010-06-05 06:34:14 +02:00
|
|
|
};
|
|
|
|
|
2018-01-23 08:48:25 +01:00
|
|
|
sub new {
|
|
|
|
my ($class, %conf) = @_;
|
|
|
|
my $self = bless {}, $class;
|
|
|
|
$self->{pbot} = delete $conf{pbot} // Carp::croak("Missing pbot reference to " . __FILE__);
|
|
|
|
return $self;
|
|
|
|
}
|
|
|
|
|
|
|
|
sub version {
|
2019-12-22 00:26:44 +01:00
|
|
|
return BUILD_NAME . " version " . BUILD_REVISION . " " . BUILD_DATE;
|
2018-01-23 08:48:25 +01:00
|
|
|
}
|
|
|
|
|
2010-06-05 06:34:14 +02:00
|
|
|
1;
|