mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-20 17:14:30 +01:00
Remove NewModule.pm skeleton file
This commit is contained in:
parent
b1c2a12500
commit
7df2346d01
@ -1,43 +0,0 @@
|
|||||||
# File: NewModule.pm
|
|
||||||
# Author: pragma_
|
|
||||||
#
|
|
||||||
# Purpose: New module skeleton
|
|
||||||
|
|
||||||
package PBot::NewModule;
|
|
||||||
|
|
||||||
use warnings;
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
use vars qw($VERSION);
|
|
||||||
$VERSION = $PBot::PBot::VERSION;
|
|
||||||
|
|
||||||
use Carp ();
|
|
||||||
|
|
||||||
sub new {
|
|
||||||
if(ref($_[1]) eq 'HASH') {
|
|
||||||
Carp::croak("Options to Logger should be key/value pairs, not hash reference");
|
|
||||||
}
|
|
||||||
|
|
||||||
my ($class, %conf) = @_;
|
|
||||||
|
|
||||||
my $self = bless {}, $class;
|
|
||||||
$self->initialize(%conf);
|
|
||||||
return $self;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub initialize {
|
|
||||||
my ($self, %conf) = @_;
|
|
||||||
|
|
||||||
my $option = delete $conf{option};
|
|
||||||
$option = 10 unless defined $option; # set to default value unless defined
|
|
||||||
|
|
||||||
if(defined $option) {
|
|
||||||
# do something (optional)
|
|
||||||
}
|
|
||||||
|
|
||||||
$self->{option} = $option;
|
|
||||||
}
|
|
||||||
|
|
||||||
# subs here
|
|
||||||
|
|
||||||
1;
|
|
@ -13,7 +13,7 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 141,
|
BUILD_REVISION => 142,
|
||||||
BUILD_DATE => "2010-06-04",
|
BUILD_DATE => "2010-06-04",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user