Skip to content

Commit 2b8dbec

Browse files
committed
Merge pull request metacpan#434 from CPAN-API/oalders/fix-tests
Oalders/fix tests
2 parents 675592a + 0752c85 commit 2b8dbec

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

lib/MetaCPAN/Document/File.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ has documentation => (
265265
sub _build_documentation {
266266
my $self = shift;
267267
$self->_build_abstract;
268-
my $documentation = $self->documentation if ( $self->has_documentation );
268+
my $documentation
269+
= $self->has_documentation ? $self->documentation : undef;
269270
return undef unless ( ${ $self->pod } );
270271
my @indexed = grep { $_->indexed } @{ $self->module || [] };
271272
if ( $documentation && $self->is_pod_file ) {

lib/MetaCPAN/Script/Release.pm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,12 @@ sub run {
143143
$self->perms;
144144
my @pid;
145145

146-
# FIXME: What is this supposed to do? Don't do 'my' in a condition.
147-
my $cpan = $self->index if ( $self->skip );
148146
eval { DB::enable_profile() };
149147
while ( my $file = shift @files ) {
150148

151149
if ( $self->skip ) {
152150
my $d = CPAN::DistnameInfo->new($file);
153-
my $count = $cpan->type('release')->filter(
151+
my $count = $self->index->type('release')->filter(
154152
{
155153
and => [
156154
{ term => { archive => $d->filename } },

t/release/weblint++-1.15.t

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ test_release(
2828
my ($self) = @_;
2929

3030
{
31-
local $TODO
32-
= 'Should we be stripping the ++ from the distribution?';
33-
is $self->data->distribution, 'weblint++',
34-
'distribution matches META name';
31+
is $self->data->distribution, 'weblint',
32+
'distribution matches META name, but strips out ++';
3533
}
3634
},
3735
}

0 commit comments

Comments
 (0)