1 |
package Frey::PPI; |
package Frey::PPI; |
2 |
use Moose; |
use Moose; |
3 |
|
|
4 |
extends 'Frey::ClassLoader'; |
extends 'Frey::Class::Loader'; |
5 |
|
|
6 |
use PPI; |
use PPI; |
7 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
69 |
return unless $el->isa('PPI::Statement::Include'); |
return unless $el->isa('PPI::Statement::Include'); |
70 |
|
|
71 |
warn "## include ",dump( $el->module, $el->type, $el->pragma ) if $self->debug; |
warn "## include ",dump( $el->module, $el->type, $el->pragma ) if $self->debug; |
72 |
push @{ $include->{ $el->type } }, $el->module |
push @{ $include->{ $el->type } }, $el->module |
73 |
|
unless $el->module eq 'lib'; # skip use lib 'lib'; |
74 |
}); |
}); |
75 |
warn "# ", $self->class, " include ", dump( $include ) if $self->debug; |
warn "# ", $self->class, " include ", dump( $include ) if $self->debug; |
76 |
return $include; |
return $include; |
122 |
if ( my $tests = $class_has_tests->{ $class } ) { |
if ( my $tests = $class_has_tests->{ $class } ) { |
123 |
my @tests = keys %$tests; |
my @tests = keys %$tests; |
124 |
warn "# has_tests $class ",dump( @tests ); |
warn "# has_tests $class ",dump( @tests ); |
125 |
return @tests; |
return @tests if wantarray; |
126 |
|
return \@tests; |
127 |
} |
} |
128 |
} |
} |
129 |
|
|