/[Frey]/trunk/lib/Frey/PPI.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/PPI.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 368 by dpavlin, Sun Nov 16 19:50:36 2008 UTC revision 369 by dpavlin, Mon Nov 17 14:37:48 2008 UTC
# Line 40  sub find { Line 40  sub find {
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 {

Legend:
Removed from v.368  
changed lines
  Added in v.369

  ViewVC Help
Powered by ViewVC 1.1.26