1. Toby Inkster
  2. p5-p5u-command-deps

Commits

Toby Inkster  committed a6cd2b5

skip VCS crud

  • Participants
  • Parent commits 23b6cc3
  • Branches default
  • Tags 0.002

Comments (0)

Files changed (2)

File lib/P5U/Command/Deps.pm

View file
 
 BEGIN {
 	$P5U::Command::Deps::AUTHORITY = 'cpan:TOBYINK';
-	$P5U::Command::Deps::VERSION   = '0.001';
+	$P5U::Command::Deps::VERSION   = '0.002';
 }
 
 use constant abstract      => q  <scan Perl source code for dependencies>;
 	
 	my @files = map {
 		-d $_
-			? "Path::Class::Rule"->new->perl_file->all($_)
+			? $self->_mk_rule->all($_)
 			: "Path::Class::File"->new($_)
 	} @$args;
-	@files = "Path::Class::Rule"->new->perl_file->all unless @$args;
+	@files = $self->_mk_rule->all unless @$args;
 	
 	my $deps = $self->_get_deps(@files);
 	$self->_whittle($deps) if exists $opt->{skipcore};
 	print $self->_output($deps, $opt->{format});
 }
 
+sub _mk_rule
+{
+	"Path::Class::Rule"->new->skip_vcs->nonempty->perl_file
+}
+
 sub _get_deps
 {
 	my ($self, @files) = @_;

File meta/changes.pret

View file
 	issued  2012-12-13;
 	label   "Initial release".
 
+`P5U-Command-Deps 0.002 cpan:TOBYINK`
+	issued  2012-12-14;
+	changeset [
+		item "When recursing directories, skip VCS crud."^^Change;
+	].
+