First off, EA does not (in version 10.0.1009) natively support forward or reverse engineering of perl.
Secondly, these templates, which are part of the Code Template Framework, are for code generation only: they cannot be used for reverse engineering.
What you want instead is the Grammar Framework (see the help file under Extending UML Models -- MDG Technology SDK). This allows you to construct a grammar for a language, which specifies what UML elements EA should create when reading source files in that language.