Skip to content

Commit

Permalink
set_associated_pod() no longer wants a $file
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Apr 23, 2016
1 parent f20a101 commit 61ca678
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/MetaCPAN/Document/Module.pm
Expand Up @@ -151,8 +151,6 @@ my %_pod_score = (
);

sub set_associated_pod {

# FIXME: Why is $file passed if it isn't used?
my ( $self, $associated_pod ) = @_;
return unless ( my $files = $associated_pod->{ $self->name } );

Expand Down Expand Up @@ -187,7 +185,7 @@ sub set_associated_pod {
@$files
#>>>
);
$self->_set_associated_pod($file->full_path);
$self->_set_associated_pod( $file->full_path );
}

__PACKAGE__->meta->make_immutable;
Expand Down
2 changes: 1 addition & 1 deletion t/document/module.t
Expand Up @@ -109,7 +109,7 @@ subtest set_associated_pod => sub {
sub test_associated_pod {
my ( $name, $files, $exp, $desc ) = @_;
my $module = MetaCPAN::Document::Module->new( name => $name );
$module->set_associated_pod( undef,
$module->set_associated_pod(
{ $name => [ map { PodFile->new($_) } @$files ] } );
is $module->associated_pod->full_path, ".../$exp",
$desc || 'Best pod file selected';
Expand Down

0 comments on commit 61ca678

Please sign in to comment.