155 |
my $attr = $meta->get_attribute($_); |
my $attr = $meta->get_attribute($_); |
156 |
my ( $before, $title, $after ) = ( '', '', '' ); |
my ( $before, $title, $after ) = ( '', '', '' ); |
157 |
( $before, $title, $after ) = ( '<b>', ' title="required"', '</b>' ) if $attr->is_required; |
( $before, $title, $after ) = ( '<b>', ' title="required"', '</b>' ) if $attr->is_required; |
158 |
qq|<td>$before<a href="/~/$package/?$_">$_</a>$after</td>| |
warn $attr->dump; |
159 |
|
foreach my $check ( qw/has_type_constraint has_handles is_weak_ref is_required is_lazy should_coerce should_auto_deref has_trigger has_documentation has_applied_traits/ ) { |
160 |
|
my $getter; |
161 |
|
|
162 |
|
$getter = $check; |
163 |
|
$getter =~ s/^has_//; |
164 |
|
|
165 |
|
if ( $attr->$check ) { |
166 |
|
if ( $getter eq $check ) { |
167 |
|
$after .= "$check "; |
168 |
|
} else { |
169 |
|
$after .= qq{<span class="frey-popup">$check}; |
170 |
|
$after .= '<span>' . $attr->$getter->dump . '</span>' if $getter ne $check; |
171 |
|
$after .= ' </span>'; |
172 |
|
} |
173 |
|
} |
174 |
|
} |
175 |
|
qq|<td>$before<a href="/~/$package/?$_">$_</a></td><td>$after</td>| |
176 |
} sort $meta->get_attribute_list |
} sort $meta->get_attribute_list |
177 |
} |
} |
178 |
|
|
179 |
my $table = qq|<table><tr><th>Methods</th><th>Attributes</th></tr>|; |
my $table = qq|<table><tr><th>Methods</th><th>Attributes</th><th>Properties</th></tr>|; |
180 |
while ( @methods || @attributes ) { |
while ( @methods || @attributes ) { |
181 |
my ($m,$a) = ( shift @methods, shift @attributes ); |
my ($m,$a) = ( shift @methods, shift @attributes ); |
182 |
$m ||= '<td></td>'; |
$m ||= '<td></td>'; |