Aion-Annotation
view release on metacpan or search on metacpan
t/aion/annotation.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::Annotation - обÑабаÑÑÐ²Ð°ÐµÑ Ð°Ð½Ð½Ð¾ÑаÑии в модÑлÑÑ
perl
#
# # VERSION
#
# 0.0.3
#
# # SYNOPSIS
#
t/aion/annotation.t view on Meta::CPAN
use Aion::Annotation;
Aion::Annotation->new->scan;
open my $f, '<', 'var/cache/modules.mtime.ini' or die $!; my @modules_mtime = <$f>; chop for @modules_mtime; close $f;
open my $f, '<', 'etc/annotation/remarks.ini' or die $!; my @remarks = <$f>; chop for @remarks; close $f;
open my $f, '<', 'etc/annotation/todo.ann' or die $!; my @todo = <$f>; chop for @todo; close $f;
open my $f, '<', 'etc/annotation/deprecated.ann' or die $!; my @deprecated = <$f>; chop for @deprecated; close $f;
open my $f, '<', 'etc/annotation/param.ann' or die $!; my @param = <$f>; chop for @param; close $f;
local ($::_g0 = do {0+@modules_mtime}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '0+@modules_mtime # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
::like scalar do {$modules_mtime[0]}, qr{^For::Test=\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d$}, '$modules_mtime[0] # ~> ^For::Test=\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d$'; undef $::_g0; undef $::_e0;
local ($::_g0 = do {\@remarks}, $::_e0 = do {['For::Test#,4=The package for testing', 'For::Test#abc,9=Is property\n readonly']}); ::is_deeply $::_g0, $::_e0, '\@remarks # --> [\'For::Test#,4=The package for testing\', \'For::Test#abc,9=Is p...
local ($::_g0 = do {\@todo}, $::_e0 = do {['For::Test#abc,6=add1', 'For::Test#xyz,11=add2']}); ::is_deeply $::_g0, $::_e0, '\@todo # --> [\'For::Test#abc,6=add1\', \'For::Test#xyz,11=add2\']' or ::diag ::_struct_diff($::_g0, $::_e0); undef...
local ($::_g0 = do {\@deprecated}, $::_e0 = do {['For::Test#,3=for_test', 'For::Test#abc,5=']}); ::is_deeply $::_g0, $::_e0, '\@deprecated # --> [\'For::Test#,3=for_test\', \'For::Test#abc,5=\']' or ::diag ::_struct_diff($::_g0, $::_e0); undef $...
local ($::_g0 = do {\@param}, $::_e0 = do {['For::Test#xyz,12=Int $a', 'For::Test#xyz,13=Int[] $r']}); ::is_deeply $::_g0, $::_e0, '\@param # --> [\'For::Test#xyz,12=Int $a\', \'For::Test#xyz,13=Int[] $r\']' or ::diag ::_struct_diff($::_g0,...
#
# # DESCRIPTION
#
# `Aion::Annotation` ÑканиÑÑÐµÑ Ð¼Ð¾Ð´Ñли perl в каÑалоге **lib** и ÑаÑпеÑаÑÑÐ²Ð°ÐµÑ Ð¸Ñ
в ÑооÑвеÑÑÑÑÑÑие ÑÐ°Ð¹Ð»Ñ Ð² каÑалоге **etc/annotation**.
#
# СмениÑÑ **lib** можно ÑеÑез ÑнвайÑÑнменÑом `AION_ANNOTATION_LIB`, **etc/annotation** ÑеÑез конÑиг `AION_ANNOTATION_INI`, а **var/cache** ÑеÑез конÑиг `AION_ANNOTATION_CACHE`.
#
# 1. Ð **modules.mtime.ini** Ñ
ÑанÑÑÑÑ Ð²Ñемена поÑледнего Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð´Ñлей.
# 2. Ð **remarks.ini** ÑоÑ
ÑанÑÑÑÑÑ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑии к подпÑогÑаммам, ÑвойÑÑвам и пакеÑам.
t/aion/annotation/scanned-event.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::Annotation::ScannedEvent - ÑобÑÑие завеÑÑÐµÐ½Ð¸Ñ ÑканиÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð°Ð½Ð½Ð¾ÑаÑий в пÑоекÑе
#
# # SYNOPSIS
#
# Файл lib/ScannedListener.pm:
#@> lib/ScannedListener.pm
#>> package ScannedListener;
#>>
t/aion/annotation/scanned-event.t view on Meta::CPAN
#>> 1;
#@< EOF
#
subtest 'SYNOPSIS' => sub {
use Aion::Annotation;
my $listener = Aion->pleroma->get('ScannedListener');
Aion::Annotation->new->scan;
local ($::_g0 = do {$listener->scanned_count}, $::_e0 = do {1}); ::ok defined($::_g0) == defined($::_e0) && $::_g0 eq $::_e0, '$listener->scanned_count # -> 1' or ::diag ::_struct_diff($::_g0, $::_e0); undef $::_g0; undef $::_e0;
#
# # DESCRIPTION
#
# Ðогда `Aion::Annotation` завеÑÑÐ°ÐµÑ ÑканиÑование пÑоекÑа и запиÑÑÐ²Ð°ÐµÑ Ð½Ð¾Ð²Ñе анноÑаÑии, Ñо оно иниÑииÑÑÐµÑ ÑÑо ÑобÑÑие.
# ÐÑи ÑÑом ÑобÑÑÐ¸Ñ Ð² ÑмиÑÑеÑе пеÑеÑиÑÑваÑÑÑÑ ÑÑÐ°Ð·Ñ Ð¿Ð¾Ñле ÑканиÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð¸ до излÑÑÐµÐ½Ð¸Ñ ÑобÑÑиÑ.
#
# ÐÑевидное пÑименение данного ÑобÑÑиÑ: пÑевÑаÑение Ñайла анноÑаÑий в `crontab`.
#
# # AUTHOR
( run in 1.505 second using v1.01-cache-2.11-cpan-d80b1682f3f )