40 |
sub attribute_order { |
sub attribute_order { |
41 |
my ( $self ) = @_; |
my ( $self ) = @_; |
42 |
|
|
43 |
my $attribute_order; |
my @attribute_order; |
44 |
$self->find(sub { |
$self->find(sub { |
45 |
my ($doc,$el) = @_; |
my ($doc,$el) = @_; |
46 |
return unless ( $el->isa('PPI::Statement') && $el->{children}->[0]->isa('PPI::Token::Word') && $el->{children}->[0]->literal eq 'has' ); |
return unless ( $el->isa('PPI::Statement') && $el->{children}->[0]->isa('PPI::Token::Word') && $el->{children}->[0]->literal eq 'has' ); |
47 |
|
|
48 |
warn "## has ",$el->{children}->[1]->literal if $self->debug; |
warn "## has ",$el->{children}->[1]->literal if $self->debug; |
49 |
push @$attribute_order, $el->{children}->[1]->literal; |
push @attribute_order, $el->{children}->[1]->literal; |
50 |
}); |
}); |
51 |
|
|
52 |
warn "# ", $self->class, " attribute_order ", dump( $attribute_order ) if $self->debug; |
warn "# ", $self->class, " attribute_order ", dump( @attribute_order ) if $self->debug; |
53 |
|
|
54 |
return $attribute_order; |
return @attribute_order if wantarray; |
55 |
|
return \@attribute_order; |
56 |
} |
} |
57 |
|
|
58 |
sub includes { |
sub includes { |