33 lines
644 B
Perl
33 lines
644 B
Perl
package DoctorAgustin::Telegram;
|
|
|
|
use v5.30.0;
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use Types::Standard qw/Str/;
|
|
use Params::ValidationCompiler qw(validation_for);
|
|
|
|
{
|
|
my $validator = validation_for(
|
|
params => {
|
|
telegram_token => { type => Str },
|
|
}
|
|
);
|
|
|
|
sub new {
|
|
my $class = shift;
|
|
my $self = bless {}, $class;
|
|
my %params = $validator->(@_);
|
|
my $telegram_token = $params{telegram_token};
|
|
$self->{telegram_token} = $telegram_token;
|
|
return $self;
|
|
}
|
|
}
|
|
|
|
sub _telegram_token {
|
|
my $self = shift;
|
|
return $self->{telegram_token};
|
|
}
|
|
1;
|