NAME
Aion::Annotation - processes annotations in perl modules
VERSION
0.0.2-prealpha
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
sub xyz {}
1;
use Aion::Annotation;
Aion::Annotation->new->scan;
open my $f, '<', 'etc/annotation/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;
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#=The package for testing', 'For::Test#abc=Is property\n readonly']
\@todo # --> ['For::Test#abc=add1', 'For::Test#xyz=add2']
\@deprecated # --> ['For::Test#=for_test', 'For::Test#abc=']
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.