Aion-Run

 view release on metacpan or  search on metacpan

lib/Aion/Run/Runner.pm  view on Meta::CPAN

use List::Util qw/pairgrep/;

use config INI => 'etc/annotation/run.ann';

use Aion;

# Список команд
has runs => (is => 'ro', isa => HashRef, default => sub {
	my($self) = @_;
	my %run;
	open my $f, '<:utf8', INI or die "Can't open ${\INI}: $!";
	while (<$f>) {
		chomp;
		warn("Annotation error. Use #\@run <rubric>:<name> <remark>\n$_\n  at ${\INI} line $."), next unless /^([\w:]+)#(\w*),(\d+)=(\S+?):(\S+)[ \t]+(.+)/am;
		$run{$5} = {
			rubric => $4,
			name   => $5,
			remark => $6,
			pkg    => $1,
			sub    => $2,
		};

script/act  view on Meta::CPAN

#!/usr/bin/env perl

use common::sense;
use open qw/:std :utf8/;

use Aion::Carp;
use Aion::Run::Runner;

if($ARGV[0] ~~ ['--help', '-h']) {
    print << "END";
Usage:
	
	act <run> [arguments]
	

t/aion/run.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 - роль для консольных команд
# 
# # VERSION
# 
# 0.0.2
# 
# # SYNOPSIS
# 

t/aion/run/run-run.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::RunRun - выполняет Perl-код и распечатывает результат на STDOUT
# 
# # SYNOPSIS
# 
subtest 'SYNOPSIS' => sub { 
use Aion::Format qw/trappout np/;
use Aion::Run::RunRun;

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”

t/aion/run/runs-run.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::RunsRun - список скриптов с аннотацией `#@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”



( run in 1.474 second using v1.01-cache-2.11-cpan-39bf76dae61 )