From ca4b3b253cdcdff6bd9d1f0a2816c65db08009ca Mon Sep 17 00:00:00 2001 From: Randy Stauner Date: Tue, 14 Jun 2011 15:24:46 -0700 Subject: [PATCH] Skip the main module when auto-discovering packages rather than duplicate it. --- bin/mcpani | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/mcpani b/bin/mcpani index 12a27f3..0afead5 100644 --- a/bin/mcpani +++ b/bin/mcpani @@ -78,6 +78,11 @@ sub add { my $provides = _find_provides( $options{file} ); while ( my ( $module, $version ) = each( %{$provides} ) ) { + # don't auto-discover the main module that we already know about + if ( $module eq $options{module} ) { + $options{version} ||= $version; + next; + } push @modules_to_add, { version => $version,