Perl-Apollo/Corinna

Proposal: introduce annotations

Closed this issue · 2 comments

Please consider adding annotations, accessible in run-time (like in Java).
This will be useful for framework authors (like Spring / SpringBoot and others).

In perl world there already are two mechanisms capable of what java annotation does

  • attributes
  • traits

With thoughts about extended slot mechanism it's possible to cover class / instance attributes as well as method arguments.

As for classes, consumption of role (trait is in fact only role) may do the same thing.
Questionable entity is method. Following aforementioned patterns:

method foo {
    does 'Deprecated';
}

And there is behaviour of generated code ...

Ovid commented

This is resolved for the MVP. Further issues should be new tickets.