Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix type rendering in PerlableAttribute.perl()
Switch to showing the container_descriptor's .of type instead of the
attribute's .type, so that array attributes will render correctly.
For example, an Int array attribute will now render as 'has Int @.array'
rather than 'has Positional @.array'.
  • Loading branch information
Geoffrey Broadwell committed Nov 23, 2013
1 parent caa75d5 commit 60c6698
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Metamodel/Perlable.pm
Expand Up @@ -10,7 +10,8 @@ role Metamodel::PerlableAttribute {
}

method perl(Metamodel::PerlableAttribute:D:) {
my $type = self.type.HOW.name(self.type);
my $of = self.container_descriptor.of;
my $type = $of.HOW.name($of);
my $name = self.name;
$name .= subst('!', '.') if self.has_accessor;
my $traits = self.traits_perl;
Expand Down

0 comments on commit 60c6698

Please sign in to comment.