Changeset 5577
- Timestamp:
- 06/25/09 09:12:24 (9 months ago)
- Location:
- trunk/Padre
- Files:
-
- 2 modified
-
Changes (modified) (1 diff)
-
lib/Padre/Task/Outline/Perl.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/Changes
r5551 r5577 4 4 5 5 Some of the refactoring code was moved to PPIx-EditorTools (MGRIMES) 6 Detection of Moose attributes in Outline view (jquelin) 6 7 7 8 v0.37 2009.06.25 -
trunk/Padre/lib/Padre/Task/Outline/Perl.pm
r5548 r5577 68 68 if ref $_[0] eq 'PPI::Statement::Package' 69 69 or ref $_[0] eq 'PPI::Statement::Include' 70 or ref $_[0] eq 'PPI::Statement::Sub'; 70 or ref $_[0] eq 'PPI::Statement::Sub' 71 or ref $_[0] eq 'PPI::Statement'; 71 72 } 72 73 ); … … 96 97 } elsif ( ref $thing eq 'PPI::Statement::Sub' ) { 97 98 push @{ $cur_pkg->{methods} }, { name => $thing->name, line => $thing->location->[0] }; 99 } elsif ( ref $thing eq 'PPI::Statement' ) { 100 # last resort, let's analyse further down... 101 my $node = $thing->first_element; 102 103 # Moose attribute declaration 104 if ( $node->isa('PPI::Token::Word') && $node->content eq 'has' ) { 105 push @{ $cur_pkg->{attributes} }, { name => $thing->child(2)->content, line => $thing->location->[0] }; 106 next; 107 } 98 108 } 99 109 } … … 230 240 ) 231 241 ); 232 foreach my $type (qw(pragmata modules methods)) {242 foreach my $type (qw(pragmata modules attributes methods)) { 233 243 _add_subtree( $outlinebar, $pkg, $type, $branch ); 234 244 }
