Aion-Run

 view release on metacpan or  search on metacpan

t/aion/run/runner.t  view on Meta::CPAN

use common::sense; use open qw/:std :utf8/;  use Carp qw//; use Cwd qw//; use File::Basename qw//; use File::Find qw//; use File::Slurper qw//; use File::Spec qw//; use File::Path qw//; use Scalar::Util qw//;  use Test::More 0.98;  use String::Diff q...
# # NAME
# 
# Aion::Run::Runner - запускает команду описанную аннотацией `#@run`
# 
# # SYNOPSIS
# 
# Файл etc/annotation/run.ann:
#@> etc/annotation/run.ann
#>> Aion::Run::RunRun#run,3=run:run „Executes Perl code in the context of the current project”
#>> Aion::Run::RunsRun#list,5=run:runs „List of scripts”
#@< EOF
# 
subtest 'SYNOPSIS' => sub { 
use Aion::Format qw/trappout np/;
use Aion::Run::Runner;
use Aion::Run::RunRun;

local ($::_g0 = do {trappout { Aion::Run::Runner->run("run", "1+2") }}, $::_e0 = do {np(3, caller_info => 0) . "\n"}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, 'trappout { Aion::Run::Runner->run("run", "1+2") } # -> np(3, caller_i...

# 
# # DESCRIPTION
# 
# `Aion::Run::Runner` считывает файл **etc/annotation/run.ann** со списком скриптов, а выполнить любой скрипт из списка можно через его метод `run`.
# 
# Путь к файлу cо скриптами можно поменять с помощью конфига `INI`.
# 
# Используется в команде `act`.
# 
# # FEATURES
# 
# ## runs
# 
# Хеш с командами. Подгружается по дефолту из файла `INI`.
# 
# # SUBROUTINES
# 
# ## run ($name, @args)
# 
# Запускает команду с именем `$name` и аргументами `@args` из списка **etc/annotation/run.ann**.
# 
# # AUTHOR
# 
# Yaroslav O. Kosmina <darviarush@mail.ru>
# 
# # LICENSE
# 
# âš– **GPLv3**
# 
# # COPYRIGHT
# 
# The Aion::Run::Runner module is copyright © 2023 Yaroslav O. Kosmina. Rusland. All rights reserved.

	::done_testing;
};

::done_testing;



( run in 2.990 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )