Skip to content

Commit

Permalink
Also remove package if file didn't match regexp
Browse files Browse the repository at this point in the history
it's pretty hard not to match the regexp, but just in case
  • Loading branch information
rwstauner committed Jun 12, 2012
1 parent d7f7e3c commit 810f9b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Dist/Metadata.pm
Expand Up @@ -235,8 +235,9 @@ sub determine_packages {

# capture file basename (without the extension)
my ($base) = ($packages->{$pack}->{file} =~ m!([^/]+)\.pm(?:\.PL)?$!);
# remove if file didn't match regexp or package doesn't match basename
delete $packages->{$pack}
if $pack !~ m{\b\Q$base\E$};
if !$base || $pack !~ m{\b\Q$base\E$};
}
}

Expand Down

0 comments on commit 810f9b1

Please sign in to comment.