Debian Codegraph @

modules/scripting/perl/lib/Atheme/Service.pm

raw
1 package Atheme::Service;
2
3 use Atheme::Command;
4 use Atheme::Internal;
5
6 sub bind_command {
7 my ($self, %args) = @_;
8
9 my $command = Atheme::Command->new(\%args);
10
11 my ($caller) = caller;
12
13 $Atheme::Internal::CommandBinds{$caller} ||= [];
14 push @{$Atheme::Internal::CommandBinds{$caller}}, { service => $self->name, command => $command };
15
16 $self->do_bind_command($command);
17 }
18
19 1;