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",
|
2018-08-14 05:06:13 +02:00
|
|
|
BUILD_REVISION => 2228,
|
2018-08-13 23:26:01 +02:00
|
|
|
BUILD_DATE => "2018-08-13",
|
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;
|