<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package Mojolicious::Che;
use Mojo::Base::Che;
use Mojo::Base  'Mojolicious';
use Mojo::Log::Che;
use Mojo::Loader qw(load_class);
#~ use Mojo::Util qw(url_unescape);
#~ use Scalar::Util 'weaken';

sub new {
  my ($class, %args) = @_;
  my $config = delete($args{config}) || 'Config.pm';
  my $app = $class-&gt;SUPER::new(%args);
  
  $app-&gt;plugin(Config =&gt;{file =&gt; $config});
  
  #~ return $app # ĐľŃŃ‚Đ°Đ˝ĐľĐ˛ĐşĐ° Đ¸Đ»Đ¸ Đ´Đ˛ĐľĐąĐ˝ĐľĐą ĐżĐµŃ€ĐµĐ·Đ°ĐżŃŃĐş kill -USR2
    #~ if $ENV{HYPNOTOAD_PID} || $ENV{HYPNOTOAD_STOP};
  
  my $conf = $app-&gt;config;
  $conf-&gt;{mojo} ||= {};
  
  my $defaults = $conf-&gt;{'mojo_defaults'} || $conf-&gt;{'mojo'}{'defaults'}  || $conf-&gt;{'mojo.defaults'};
  $app-&gt;defaults($defaults)
    if $defaults;
  
  my $secret = $conf-&gt;{'mojo_secret'} || $conf-&gt;{'mojo_secrets'} || $conf-&gt;{'mojo'}{'secret'} || $conf-&gt;{'mojo'}{'secrets'} || $conf-&gt;{'mojo.secret'} || $conf-&gt;{'mojo.secrets'} || $conf-&gt;{'ŃĐ¸Ń„Ń€Ń‹'} || [rand];
  $app-&gt;secrets($secret);
  
  my $mode = $conf-&gt;{'mojo_mode'} || $conf-&gt;{'mojo'}{'mode'} || $conf-&gt;{'mojo.mode'};
  $app-&gt;mode($mode) # Đ¤Đ°ĐąĐ» Đ»ĐľĐłĐ° ŃĐ¶Đµ Đ˝Đµ ĐżĐµŃ€ĐµĐşĐ»ŃŽŃ‡Đ¸ŃŃŚ
    if $mode;
  #~ $app-&gt;log-&gt;level( $conf-&gt;{'mojo_log_level'} || $conf-&gt;{'mojo'}{'log_level'} || 'debug');
  my $log = $conf-&gt;{'mojo_log'} || $conf-&gt;{'mojo.log'} || $conf-&gt;{'mojo'}{'log'};
  $app-&gt;log(Mojo::Log::Che-&gt;new(%$log))
    if $log;
  #~ warn "Mode: ", $app-&gt;mode, "; log level: ", $app-&gt;log-&gt;level;
  
  my $home = $app-&gt;home;
  my $statics = $conf-&gt;{'mojo_static_paths'} || $conf-&gt;{'mojo.static.paths'} || $conf-&gt;{'mojo'}{'static'}{'paths'} || [];
   #~ push @{$app-&gt;static-&gt;paths}, @{$paths} if $paths;
  push @{$app-&gt;static-&gt;paths},  $home-&gt;rel_file($_)
    for @$statics;
  
  my $templates_paths = $conf-&gt;{'mojo_renderer_paths'} || $conf-&gt;{'mojo.renderer.paths'} || $conf-&gt;{'mojo'}{'renderer'}{'paths'} || [];
  push @{$app-&gt;renderer-&gt;paths}, $home-&gt;rel_dir($_)
    for @$templates_paths;
  
  my $renderer_classes = $conf-&gt;{'mojo_renderer_classes'} || $conf-&gt;{'mojo.renderer.classes'} || $conf-&gt;{'mojo'}{'renderer'}{'classes'} || [];
  push @{$app-&gt;renderer-&gt;classes}, $_
    for grep ! load_class($_), @$renderer_classes;
  
  $app-&gt;ŃĐµŃŃĐ¸ŃŹ();
  $app-&gt;Ń…Đ°Đ·Ń‹();
  $app-&gt;ĐżĐ»ŃĐłĐ¸Đ˝Ń‹();
  $app-&gt;Ń…ŃĐşĐ¸();
  $app-&gt;ŃĐżĐµĐąŃŃ‹();
  $app-&gt;ĐĽĐ°Ń€ŃŃ€ŃŃ‚Ń‹();
  $app-&gt;Đ·Đ°Đ´Đ°Ń‡Đ¸();
  $app-&gt;Ń‚Đ¸ĐżŃ‹();
  #~ $app-&gt;minion_worker();

  return $app;

}

sub Ń…Đ°Đ·Ń‹ { # ĐĄĐ°Đ·Ń‹ Đ¸Đ· ĐşĐľĐ˝Ń„Đ¸ĐłĐ°
  my $app = shift;
  my $conf = $app-&gt;config;
  my $h = $conf-&gt;{'mojo_has'} || $conf-&gt;{'mojo.has'} || $conf-&gt;{'mojo'}{'has'} || $conf-&gt;{'Ń…Đ°Đ·Ń‹'};
  map {
    $app-&gt;log-&gt;debug("Make the app-&gt;has('$_')");
    has $_ =&gt; $h-&gt;{$_};
  } keys %$h;
}

#~ sub ĐżĐ»ŃĐłĐ¸Đ˝Ń‹ {# ĐźĐ»ŃĐłĐ¸Đ˝Ń‹ Đ¸Đ· ĐşĐľĐ˝Ń„Đ¸ĐłĐ°
has ĐżĐ»ŃĐłĐ¸Đ˝Ń‹ =&gt; sub {
  my $app = shift;
  my $conf = $app-&gt;config;
  my $ĐżĐ»ŃĐłĐ¸Đ˝Ń‹ = {};
  my $plugins = $conf-&gt;{'mojo_plugins'} || $conf-&gt;{'mojo.plugins'} || $conf-&gt;{'mojo'}{'plugins'} || $conf-&gt;{'ĐżĐ»ŃĐłĐ¸Đ˝Ń‹'}
    || return;
  map {
    push @{ $ĐżĐ»ŃĐłĐ¸Đ˝Ń‹-&gt;{$_-&gt;[0]} ||= [] }, [ref $_-&gt;[1] eq 'CODE' ? $app-&gt;plugin($_-&gt;[0] =&gt; $app-&gt;${ \$_-&gt;[1] }) : $app-&gt;plugin(@$_)];
    $app-&gt;log-&gt;debug("Enable plugin [$_-&gt;[0]]");
  } @$plugins;
  return $ĐżĐ»ŃĐłĐ¸Đ˝Ń‹;
};

=pod
has dbh =&gt; sub {#~ sub Đ±Đ°Đ·Ń‹ {# ĐľĐ±Ń€Đ°Đ±Đ°Ń‚Ń‹Đ˛Đ°ĐµŃ‚ dbh ĐşĐľĐ˝Ń„Đ¸ĐłĐ°
  my $app = shift;
  my $conf = $app-&gt;config;
  my $c_dbh = $conf-&gt;{dbh} || $conf-&gt;{'Đ±Đ°Đ·Ń‹'};
  return unless $c_dbh &amp;&amp; ref($c_dbh) eq 'HASH' &amp;&amp; keys %$c_dbh;
  
  my $dbh = {};
  
  my $req_dbi;
  while (my ($db, $opt) = each %$c_dbh) {
    if ($opt-&gt;{dbh}) {# &amp;&amp; ref $opt eq 'DBI::db'
      $dbh-&gt;{$db} ||= $opt-&gt;{dbh};
    } else {
      ++$req_dbi
        and require DBI
        unless $req_dbi;
      $dbh-&gt;{$db} ||= DBI-&gt;connect(@{$opt-&gt;{connect}});
      $app-&gt;log-&gt;debug("ĐˇĐľĐµĐ´Đ¸Đ˝Đ¸Đ»ŃŃŹ Ń Đ±Đ°Đ·ĐľĐą $opt-&gt;{connect}[0] app-&gt;dbh-&gt;{'$db'}");
    }
    
    map {
      $dbh-&gt;{$db}-&gt;do($_);
    } @{$opt-&gt;{do}} if $opt-&gt;{do};
    

  }
  return $dbh;
  
};
=cut

  
sub Ń…ŃĐşĐ¸ {# ĐĄŃĐşĐ¸ Đ¸Đ· ĐşĐľĐ˝Ń„Đ¸ĐłĐ°
  my $app = shift;
  my $conf = $app-&gt;config;
  my $hooks = $conf-&gt;{'mojo_hooks'} || $conf-&gt;{'mojo.hooks'} || $conf-&gt;{'mojo'}{'hooks'} || $conf-&gt;{'Ń…ŃĐşĐ¸'}
     || return;
  while (my ($name, $sub) = each %$hooks) {
    if (ref $sub eq 'ARRAY') {
      $app-&gt;hook($name =&gt; $_)
        for @$sub;
    } else {
      $app-&gt;hook($name =&gt; $sub);
    }
    
    $app-&gt;log-&gt;debug(sprintf("Applied hook%s [%s] from config", ref $sub eq 'ARRAY' ? "s (@{[ scalar @$sub]})" : '', $name));
  }

}

sub ŃĐµŃŃĐ¸ŃŹ {
  my $app = shift;
  my $conf = $app-&gt;config;
  my $session = $conf-&gt;{'mojo_session'} || $conf-&gt;{'mojo_sessions'}  || $conf-&gt;{'mojo.session'}  || $conf-&gt;{'mojo.sessions'} || $conf-&gt;{'mojo'}{'session'} || $conf-&gt;{'mojo'}{'sessions'} || $conf-&gt;{'ŃĐµŃŃĐ¸Đ¸'} || $conf-&gt;{'ŃĐµŃŃĐ¸ŃŹ'}
    || return;
  
  #~ $app-&gt;sessions-&gt;cookie_name($session-&gt;{'cookie_name'})
    #~ if $session-&gt;{'cookie_name'};
  
  #~ $app-&gt;sessions-&gt;default_expiration($session-&gt;{'default_expiration'}) # set expiry
    #~ if defined $session-&gt;{'default_expiration'};
  
  while (my ($meth, $val) = each %$session) {
    next
      unless $app-&gt;sessions-&gt;can($meth);
    $app-&gt;sessions-&gt;$meth($val);
  }
}

sub ĐĽĐ°Ń€ŃŃ€ŃŃ‚Ń‹ {
  my $app = shift;
  my $conf = $app-&gt;config;
  my $routes = $conf-&gt;{'mojo_routes'} || $conf-&gt;{'mojo.routes'} || $conf-&gt;{'mojo'}{'routes'} || $conf-&gt;{'routes'} || $conf-&gt;{'ĐĽĐ°Ń€ŃŃ€ŃŃ‚Ń‹'}
    or return;
  my $app_routes = $app-&gt;routes;
  my $apply_route = sub {
    my $r = shift || $app_routes;
    my ($meth, $arg) = @_;
    my $nr;
    if (my $m = $r-&gt;can($meth)) {
      $nr = $r-&gt;$m($arg) unless ref($arg);
      $nr = $r-&gt;$m(cb =&gt; $arg) if ref($arg) eq 'CODE';
      $nr = $r-&gt;$m(@$arg) if ref($arg) eq 'ARRAY';
      $nr = $r-&gt;$m(%$arg) if ref($arg) eq 'HASH';
      
    }  else {
      $app-&gt;log-&gt;warn("Can't method [$meth] for route",);
    }
    return $nr;
  };
  
  for my $r (@$routes) {
    my $nr = $apply_route-&gt;($app_routes, @$r[0,1])
      or next;
    $app-&gt;log-&gt;debug("Apply route [$r-&gt;[0] $r-&gt;[1]]");
    for( my $i = 2; $i &lt; @$r; $i += 2 ) {
      $nr = $apply_route-&gt;($nr, @$r[$i, $i+1])
        or next;
    }
  }
}

sub ŃĐżĐµĐąŃŃ‹ {
  my $app = shift;
  my $conf = $app-&gt;config;
  my $ns =  $conf-&gt;{'mojo_namespaces'} || $conf-&gt;{'mojo.namespaces'} || $conf-&gt;{'mojo'}{'namespaces'} || $conf-&gt;{'namespaces'} || $conf-&gt;{'ns'} || $conf-&gt;{'ŃĐżĐµĐąŃŃ‹'}
    || return;
  push @{$app-&gt;routes-&gt;namespaces}, @$ns;
}

sub Đ·Đ°Đ´Đ°Ń‡Đ¸ {
  my $app = shift;
  my $conf = $app-&gt;config;
  my $tasks = $conf-&gt;{'jobs'} || $conf-&gt;{'tasks'} || $conf-&gt;{'Đ·Đ°Đ´Đ°Ń‡Đ¸'}
    or return;
  
  die "You have jobs and first enable plugin Minion"
    unless $app-&gt;renderer-&gt;get_helper('minion');
  
  while (my ($name, $sub) = each %$tasks) {
    $app-&gt;log-&gt;debug(sprintf("Applied task [%s] in [%s] from config", $name, $app-&gt;minion-&gt;add_task($name =&gt; $sub)));
  }
  #~ $app-&gt;minion-&gt;reset;
}


sub Ń‚Đ¸ĐżŃ‹ {#MIME
  my $app = shift;
  my $conf = $app-&gt;config;
  my $types = $conf-&gt;{'mojo_types'}  || $conf-&gt;{'mojo.types'} || $conf-&gt;{'mojo'}{'types'} || $conf-&gt;{'types'} || $conf-&gt;{'Ń‚Đ¸ĐżŃ‹'}
    or return;
  while (my ($name, $val) = each %$types) {
    $app-&gt;types-&gt;type($name =&gt; $val);
    $app-&gt;log-&gt;debug(sprintf("Applied type [%s] from config", $name));
  }
}

# overide only on my $path   = $req-&gt;url-&gt;path-&gt;to_abs_string;
sub Mojolicious::dispatch {
  my ($self, $c) = @_;

  my $plugins = $self-&gt;plugins-&gt;emit_hook(before_dispatch =&gt; $c);

  # Try to find a static file
  my $tx = $c-&gt;tx;
  $self-&gt;static-&gt;dispatch($c) and $plugins-&gt;emit_hook(after_static =&gt; $c)
    unless $tx-&gt;res-&gt;code;

  # Start timer (ignore static files)
  my $stash = $c-&gt;stash;
  $c-&gt;helpers-&gt;log-&gt;debug(sub {
    my $req    = $c-&gt;req;
    my $url = $req-&gt;url-&gt;to_abs;
    $c-&gt;helpers-&gt;timing-&gt;begin('mojo.timer');
    #~ return sprintf qq{[%s] %s "%s://%s%s%s"},
      #~ $req-&gt;request_id, $req-&gt;method, $url-&gt;scheme, $url-&gt;host, $url-&gt;port ? ":".$url-&gt;port : '', $url-&gt;path-&gt;to_route;
    return sprintf qq{%s "%s"}, $req-&gt;method, Mojo::Util::decode('UTF-8',  Mojo::Util::url_unescape($url));
  }) unless $stash-&gt;{'mojo.static'};

  # Routes
  $plugins-&gt;emit_hook(before_routes =&gt; $c);
  $c-&gt;helpers-&gt;reply-&gt;not_found
    unless $tx-&gt;res-&gt;code || $self-&gt;routes-&gt;dispatch($c) || $tx-&gt;res-&gt;code || $stash-&gt;{'mojo.rendered'};
}


our $VERSION = '0.0919';# as to Mojolicious/100+0.000&lt;minor&gt;

=pod

=encoding utf8

=head1 Mojolicious::Che

Đ”ĐľĐ±Ń€ĐľĐłĐľ Đ˛ŃĐµĐĽ

Âˇ Âˇ Âˇ ALL GLORY TO GLORIA ! ! !

=head1 VERSION

0.0919

=head1 NAME

Mojolicious::Che - ĐśĐľĐą Đ±Đ°Đ·ĐľĐ˛Ń‹Đą ĐĽĐľĐ´ŃĐ»ŃŚ Đ´Đ»ŃŹ ĐżŃ€Đ¸Đ»ĐľĐ¶ĐµĐ˝Đ¸Đą Mojolicious. ĐťŃĐ¶ĐµĐ˝ Ń‚ĐľĐ»ŃŚĐşĐľ Ń€Đ°Đ·Đ˛ĐµŃ€Đ˝ŃŃ‚Ń‹Đą ĐşĐľĐ˝Ń„Đ¸Đł.

=head1 SYNOPSIS

  # app.pl
  use lib 'lib';
  use Mojo::Base 'Mojolicious::Che';
  __PACKAGE__-&gt;new(config =&gt; 'lib/Config.pm')-&gt;start();


=head1 Config file

ĐźĐľŃ€ŃŹĐ´ĐľĐş ŃŃ‚Ń€ĐľĐş Đ˛ ŃŤŃ‚ĐľĐĽ ĐşĐľĐ˝Ń„Đ¸ĐłĐµ ŃĐľĐľŃ‚Đ˛ĐµŃ‚ŃŃ‚Đ˛ŃĐµŃ‚ Đ¸ŃĐżĐľĐ»Đ˝ĐµĐ˝Đ¸ŃŽ Đ˛ ĐĽĐľĐ´ŃĐ»Đµ!

  {
  'ĐźŃ€ĐľĐµĐşŃ‚'=&gt;'Đ˘ĐµŃŃ‚-ĐżŃ€ĐľĐµĐşŃ‚',
  # mojo =&gt; {
    # defaults =&gt;
    # secrets =&gt;
    # mode=&gt;
    # log =&gt; {level=&gt;...}
    # static =&gt; {paths =&gt; [...]},
    # renderer =&gt; {paths =&gt; [...], classes =&gt; [...], },
    # session[s] =&gt;
    # has =&gt;
    # plugins =&gt;
    # hooks =&gt;
    # namespaces =&gt;
    # routes =&gt;
    # jobs =&gt;
    # types =&gt;
  # },
  # or with prefix mojo_
  # Default values for "stash" in Mojolicious::Controller, assigned for every new request.
  mojo_defaults =&gt; {layout=&gt;'default',},
  # 'ŃĐ¸Ń„Ń€Ń‹' =&gt; [
  mojo_secrets =&gt; ['true 123 my app',],
  mojo_mode=&gt; 'development',
  mojo_log=&gt;{level =&gt; 'error'},
  mojo_static_paths =&gt; ["static"],
  mojo_renderer_classes =&gt; ["Mojolicious::Foo::Fun"],
  # 'ŃĐµŃŃĐ¸ŃŹ'(Đ¸Đ»Đ¸ ŃĐµŃŃĐ¸Đ¸) =&gt; 
  mojo_session[s] =&gt; {cookie_name =&gt; 'EXX', default_expiration =&gt; 86400},
  
  # 'Ń…Đ°Đ·Ń‹' =&gt; 'Đ›ĐµŃ‚ 500-700 Đ˝Đ°Đ·Đ°Đ´ Đ±Ń‹Đ» Ń‚Đ°ĐşĐľĐą Đ´Đ¸ĐşĐ¸Đą ŃŃ‚ĐµĐżĐ˝ĐľĐą Ń‚ĐľŃ€ĐłĐľĐ˛Ń‹Đą Đ¶Đ°Đ´Đ˝Ń‹Đą Đ˝Đ°Ń€ĐľĐ´ ĐĄĐĐ—ĐĐ&nbsp;Đ«. ĐˇŃ‚ĐľĐ»Đ¸Ń†ĐµĐą Đ¸Ń… "ĐłĐľŃŃĐ´Đ°Ń€ŃŃ‚Đ˛Đ°" Đ±Ń‹Đ» ĐłĐľŃ€ĐľĐ´ Đ˘ŃŚĐĽŃŃ‚Đ°Ń€Đ°ĐşĐ°Đ˝ŃŚ, ĐłĐ´Đµ-Ń‚Đľ Đ˝Đ° Đ±ĐµŃ€ĐµĐłŃ ĐĽĐľŃ€ŃŹ ĐšĐ°ŃĐżĐ¸ŃŹ. ĐźĐľŃ‚ĐľĐĽĐşĐ¸ ŃŤŃ‚Đ¸Ń… Đ»ŃŽĐ´ĐµĐą Ń€Đ°ŃŃŃ‹ĐżĐ°Đ˝Ń‹ ĐżĐľ ŃŃ‚Ń€Đ°Đ˝Đ°ĐĽ Đ&nbsp;ĐľŃŃĐ¸Đ¸, ĐˇŃ€ĐµĐ´Đ˝ĐµĐą ĐĐ·Đ¸Đ¸, Đ•Đ˛Ń€ĐľĐżŃ‹. Đ•ŃŃ‚ŃŚ ĐĽĐ˝ĐµĐ˝Đ¸Đµ, Ń‡Ń‚Đľ Ń…Đ°Đ·Đ°Ń€Ń‹ ĐżŃ€Đ¸ŃĐ˛ĐľĐ¸Đ»Đ¸ ŃĐµĐ±Đµ Đ˝Đ°Đ·Đ˛Đ°Đ˝Đ¸Đµ Đ•Đ’Đ&nbsp;Đ•Đ, Đ˝Đľ ŃŤŃ‚Đľ Đ˝Đµ Ń‚Đµ Đ±Đ¸Đ±Đ»ĐµĐąŃĐşĐ¸Đµ ĐşŃ€ĐľŃ‚ĐşĐ¸Đµ ĐµĐ˛Ń€ĐµĐ¸, Đ° Đ¶Đ°Đ´Đ˝Ń‹Đµ ĐżĐľŃ‚ĐľĐĽĐşĐ¸ ĐşŃ€ĐľĐĽĐ°Đ˝ŃŚĐľĐ˝Ń†ĐµĐ˛'
  mojo_has =&gt; {
    foo =&gt; sub {my $app = shift; return 'is a bar';},
  },
  
  # 'ĐżĐ»ŃĐłĐ¸Đ˝Ń‹'=&gt; [
  mojo_plugins=&gt;[ 
      ['Foo::Bar'],
      [Foo::Bar::Plugin =&gt; opt1 =&gt; ..., opt2 =&gt; ...],
      ['Foo::Plugin' =&gt; sub {&lt;...returns config data list...&gt;}],
  ],
  # 'Ń…ŃĐşĐ¸' =&gt; 
  mojo_hooks=&gt;{
    #~ before_dispatch =&gt; sub {1;},
  },
  # 'ŃĐżĐµĐąŃŃ‹' =&gt; [...]
  namespaces =&gt; ['Space::Shattle'],
  # 'ĐĽĐ°Ń€ŃŃ€ŃŃ‚Ń‹' =&gt; [...]
  routes =&gt; [
    [get=&gt;'/', to=&gt; {cb=&gt;sub{shift-&gt;render(format=&gt;'txt', text=&gt;'Hello friend!');},}],
  ]
  #~ 'Đ·Đ°Đ´Đ°Ń‡Đ¸'=&gt; {#first enable plugin Minion
  jobs =&gt; {
    slow_log =&gt; sub {
      my ($job, $msg) = @_;
      sleep 5;
      $job-&gt;app-&gt;log-&gt;error(qq{slow_log "$msg"});
    },
  },
  # Đ¸Đ»Đ¸ 'Ń‚Đ¸ĐżŃ‹'=&gt;{...}
  types =&gt; {
    docx =&gt; ['application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
    ...
  },
  };

=head1 ATTRIBUTES

B&lt;Mojolicious::Che&gt; inherits all attributes from L&lt;Mojolicious&gt; and implements the
following new ones.

=head2 dbh

Set DBI handlers from config B&lt;dbh&gt; (Đ¸Đ»Đ¸ B&lt;Đ±Đ°Đ·Ń‹&gt;)

  my $dbh = $app-&gt;dbh-&gt;{main};

=head2 sth

Set prepared stattements from config B&lt;sth&gt; (Đ¸Đ»Đ¸ B&lt;Đ·Đ°ĐżŃ€ĐľŃŃ‹&gt;).

  my $sth = $app-&gt;sth-&gt;{main}{foo};

=head2 ĐżĐ»ŃĐłĐ¸Đ˝Ń‹

Apply the plugins. See L&lt;Mojolicious#plugins&gt;, L&lt;Mojolicious::Plugins&gt;.

=head1 METHODS

B&lt;Mojolicious::Che&gt; inherits all methods from L&lt;Mojolicious&gt; and implements the following new ones.

=head2 ŃĐµŃŃĐ¸ŃŹ()

Session object config apply. See L&lt;Mojolicious#sessions&gt;, L&lt;Mojolicious::Sessions&gt;.

=head2 Ń…Đ°Đ·Ń‹()

Apply the has's. UTF names allow.

=head2 Ń…ŃĐşĐ¸()

Apply the hooks. See L&lt;Mojolicious#HOOKS&gt;.

=head2 ŃĐżĐµĐąŃŃ‹()

Apply the namespaces. Push @{$app-&gt;routes-&gt;namespaces} your namespaces. See L&lt;Mojolicious#routes&gt;.

  namespaces =&gt; ['Space::Shattle'],

=head2 ĐĽĐ°Ń€ŃŃ€ŃŃ‚Ń‹()

Apply the routes. See L&lt;Mojolicious#routes&gt;, L&lt;Mojolicious::Guides::Routing&gt;.

  #~ 'ĐĽĐ°Ń€ŃŃ€ŃŃ‚Ń‹' =&gt; [
  'routes'=&gt;[
    [get=&gt;'/', to=&gt; {cb=&gt;sub{shift-&gt;render(format=&gt;'txt', text=&gt;'Welcome!');},}],
  ],

=head2 Đ·Đ°Đ´Đ°Ń‡Đ¸()

Apply the jobs. See L&lt;Minion&gt;.

  #~ 'Đ·Đ°Đ´Đ°Ń‡Đ¸'=&gt; {#first enable plugin Minion
  'jobs'=&gt; { # or tasks
    slow_log =&gt; sub {
      my ($job, $msg) = @_;
      sleep 5;
      $job-&gt;app-&gt;log-&gt;error(qq{slow_log "$msg"});
    },
    
  },

=head Ń‚Đ¸ĐżŃ‹()

Apply the new types. See L&lt;Mojolicious#types&gt;, L&lt;Mojolicious::Types&gt;.

=head1 SEE ALSO

L&lt;Mojolicious&gt;

L&lt;Ado&gt;

=head1 AUTHOR

ĐśĐ¸Ń…Đ°Đ¸Đ» Đ§Đµ (Mikhail Che), C&lt;&lt; &lt;mche[-at-]cpan.org&gt; &gt;&gt;

=head1 BUGS / CONTRIBUTING

Please report any bugs or feature requests at L&lt;https://github.com/mche/Mojolicious-Che/issues&gt;.
Pull requests also welcome.

=head1 COPYRIGHT

Copyright 2016+ Mikhail Che.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

1;</pre></body></html>