mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-25 04:02:37 +01:00
44 lines
891 B
Perl
44 lines
891 B
Perl
# File: VERSION.pm
|
|
# Author: pragma_
|
|
#
|
|
# Purpose: Keeps track of bot version.
|
|
|
|
# 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/.
|
|
|
|
# $Id$
|
|
|
|
package PBot::VERSION;
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use feature 'unicode_strings';
|
|
|
|
BEGIN {
|
|
use Exporter;
|
|
our @ISA = 'Exporter';
|
|
our @EXPORT_OK = qw(version);
|
|
}
|
|
|
|
# These are set automatically by the build/commit script
|
|
use constant {
|
|
BUILD_NAME => "PBot",
|
|
BUILD_REVISION => 2598,
|
|
BUILD_DATE => "2019-12-21",
|
|
};
|
|
|
|
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 . " version " . BUILD_REVISION . " " . BUILD_DATE;
|
|
}
|
|
|
|
1;
|