/[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 1096 by dpavlin, Tue Jan 6 14:50:30 2009 UTC revision 1097 by dpavlin, Sun Jun 28 20:34:40 2009 UTC
# Line 5  extends 'Frey::Class::Loader'; Line 5  extends 'Frey::Class::Loader';
5    
6  use PPI;  use PPI;
7  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
8    use File::Find;
9    
10  has 'class' => (  has 'class' => (
11          is => 'rw',          is => 'rw',
# Line 81  our $class_has_tests; Line 82  our $class_has_tests;
82  sub parse_tests {  sub parse_tests {
83          my ( $self ) = @_;          my ( $self ) = @_;
84    
85          map {          finddepth({ no_chdir => 1, wanted => sub {
86                    return unless m{\.t$};
87    
88                  warn "## ppi test $_" if $self->debug;                  warn "## ppi test $_" if $self->debug;
89    
90                  my $doc = Frey::PPI->new( class => $_ );                  my $doc = Frey::PPI->new( class => $_ );
# Line 100  sub parse_tests { Line 103  sub parse_tests {
103                          my $class = $el->child(1)->child(0)->child(0)->literal;                          my $class = $el->child(1)->child(0)->child(0)->literal;
104                          $class_has_tests->{$class}->{$_}++;                          $class_has_tests->{$class}->{$_}++;
105                  });                  });
106          } glob 't/*.t';          } }, 't/');
107          warn "# collected class tests ",dump( $class_has_tests ) if $self->debug;          warn "# collected class tests ",dump( $class_has_tests ) if $self->debug;
108    
109          return $class_has_tests;          return $class_has_tests;

Legend:
Removed from v.1096  
changed lines
  Added in v.1097

  ViewVC Help
Powered by ViewVC 1.1.26