Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to changes in v20241208.001 related to pull request #62 #67

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ Revision history for Perl extension CPAN-Audit
eventually be phased out.
* The `installed` command now looks only at the versions you have
installed. This changes the comparison from '>=' to '=='. (#62)
* The default range operator is now `==` instead of `>=`. You can
always specify which way you want the check to work by using an
briandfoy marked this conversation as resolved.
Show resolved Hide resolved
explicit range operator
* Since these are significant changes, please report any weird
situations that might arise.

Expand Down
6 changes: 5 additions & 1 deletion lib/CPAN/Audit.pm
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ sub command_deps {
return "Usage: deps <dir>" unless -d $dir;

my @deps = $self->{discover}->discover($dir);
push @deps, { dist => 'perl', version => $] } if $self->{include_perl};

$self->verbose( sprintf 'Discovered %d dependencies', scalar(@deps) );

Expand Down Expand Up @@ -196,9 +197,11 @@ sub command_installed {
|| $self->{db}->{module2dist}->{ $dep->{module} };
next unless $dist;

$dists->{ $dep->{dist} } = '==' . $dep->{version};
$dists->{ $dep->{dist} } = $dep->{version};
}

$_ = "==$_" for values %$dists;
briandfoy marked this conversation as resolved.
Show resolved Hide resolved

return;
}

Expand Down Expand Up @@ -242,6 +245,7 @@ sub command {
my $dist = $self->{db}{module2dist}{$mod} or next;
$dists->{$dist} = $ver if( ! defined $dists->{$dist} or version->parse($ver) > $dists->{$dist} );
}
delete $dists->{perl};
}
}

Expand Down