3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-01-25 19:44:26 +01:00

Plugins/Plugin: move bless down a bit

This commit is contained in:
Pragmatic Software 2021-07-13 14:04:14 -07:00
parent 67f6c1d39f
commit 2a1312a0c5

View File

@ -12,14 +12,13 @@ use PBot::Imports;
sub new { sub new {
my ($class, %args) = @_; my ($class, %args) = @_;
my $self = bless {}, $class;
if (not exists $args{pbot}) { if (not exists $args{pbot}) {
my ($package, $filename, $line) = caller(0); my ($package, $filename, $line) = caller(0);
my (undef, undef, undef, $subroutine) = caller(1); my (undef, undef, undef, $subroutine) = caller(1);
Carp::croak("Missing pbot reference to " . $class . ", created by $subroutine at $filename:$line"); Carp::croak("Missing pbot reference to " . $class . ", created by $subroutine at $filename:$line");
} }
my $self = bless {}, $class;
$self->{pbot} = $args{pbot}; $self->{pbot} = $args{pbot};
$self->initialize(%args); $self->initialize(%args);
return $self; return $self;