diff options
Diffstat (limited to 'lib/Bot/Games.pm')
-rw-r--r-- | lib/Bot/Games.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Bot/Games.pm b/lib/Bot/Games.pm index 8e0338d..f306b52 100644 --- a/lib/Bot/Games.pm +++ b/lib/Bot/Games.pm @@ -98,6 +98,16 @@ sub BUILD { $self->_ime; } +sub _check_required { + my $self = shift; + my @attrs = @_; + my $protocol = $self->protocol; + for my $attr (@attrs) { + die "Protocol $protocol requires option $attr to be set" + unless defined $self->$attr; + } +} + sub _build_credentials { my $self = shift; my $protocol = $self->protocol; |