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;
|
|
|
|
|
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-05-30 18:25:35 +02:00
|
|
|
BUILD_REVISION => 2362,
|
2019-05-30 09:27:58 +02:00
|
|
|
BUILD_DATE => "2019-05-30",
|
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 {
|
|
|
|
return BUILD_NAME . " revision " . BUILD_REVISION . " " . BUILD_DATE;
|
|
|
|
}
|
|
|
|
|
2010-06-05 06:34:14 +02:00
|
|
|
1;
|