NAME
Aion::Annotation - processes annotations in perl modules
VERSION
0.0.3
SYNOPSIS
lib/For/Test.pm file:
package For::Test;
# The package for testing
#@deprecated for_test
#@deprecated
#@todo add1
# Is property
# readonly
has abc => (is => 'ro');
#@todo add2
#@param Int $a
#@param Int[] $r
sub xyz {}
1;
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;
0+@modules_mtime # -> 1
$modules_mtime[0] # ~> ^For::Test=\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d$
\@remarks # --> ['For::Test#,4=The package for testing', 'For::Test#abc,9=Is property\n readonly']
\@todo # --> ['For::Test#abc,6=add1', 'For::Test#xyz,11=add2']
\@deprecated # --> ['For::Test#,3=for_test', 'For::Test#abc,5=']
\@param # --> ['For::Test#xyz,12=Int $a', 'For::Test#xyz,13=Int[] $r']
DESCRIPTION
Aion::Annotation scans the perl modules in the lib directory and prints them to the corresponding files in the etc/annotation directory.
You can change lib through the LIB config, and etc/annotation through the INI config.
- 1. modules.mtime.ini stores the times of the last module update.
- 2. remarks.ini stores comments for routines, properties and packages.
- 3. The name.ann files save annotations by their names.
SUBROUTINES/METHODS
scan ()
Scans the codebase specified by the LIB config (list of directories, default ["lib"]). And it takes out all the annotations and comments and prints them into the corresponding files in the INI directory (by default "etc/annotation").
AUTHOR
Yaroslav O. Kosmina mailto:dart@cpan.org
LICENSE
⚖ GPLv3
COPYRIGHT
The Aion::Annotation module is copyright © 2025 Yaroslav O. Kosmina. Rusland. All Rights Reserved.