random_caption abs_path_of_sample_mojo_conf fev);
use Mojolicious::Lite;
use Mojolicious::Plugin::JSONConfig;
use Mojolicious::Plugin::Webtail;
use WWW::Telegram::BotAPI;
use Date::Format;
use Telegra
ot',
getcwd.'/camshotbot.conf.json',
abs_path_of_sample_mojo_conf(__PACKAGE__),
);
print "Using config: ".$config_file_path."\n";
my $config_values = plugin 'JSONConfig' => { file => $config_fil
post '/'.$telegram_token => sub {
my $c = shift;
my $update = $c->req->json;
$c->answer($update);
$c->render(json => "ok");
};
get '/' => sub {
shift->render(text => 'bot is running');
};
_name = $app_pm_basename;
$app_name =~ s/\.pm//;
return dirname($pm_location).'/'.$app_name.".json.example";
}
sub first_existing_variable {
for(@_){ return $_ if $_ }
# return (grep{$_}@_)[
mple_mojo_conf
When packaging as module Mojolicious applications that use
L<Mojolicious::Plugin::JSONConfig> or L<Mojolicious::Plugin::Config>
it's needed to create a sample file inside of it
This f
call it same as *.pm file NAME
E.g. you have CamshotBot.pm so you must name config as CamshotBot.json.example
=head2 first_existing_variable
Return first existing non-empty variable or undef from g