Skip to content

Commit

Permalink
bump Module::Metadata and correct for the new behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
monken committed May 1, 2014
1 parent 2a59e2b commit 8ec0c1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpanfile
Expand Up @@ -79,7 +79,7 @@ requires 'List::Util';
requires 'Log::Contextual';
requires 'Log::Log4perl';
requires 'Log::Log4perl::Appender::ScreenColoredLevels';
requires 'Module::Metadata', '1.000012';
requires 'Module::Metadata', '1.000022';
requires 'Module::Pluggable';
requires 'Module::Runtime';
requires 'Moose';
Expand Down
6 changes: 4 additions & 2 deletions lib/MetaCPAN/Script/Release.pm
Expand Up @@ -386,8 +386,10 @@ sub import_tarball {
{ name => $pkg,
defined $version

# Stringify if it's an object (and don't die if it's not).
? ( version => $version . '' )
# Stringify if it's aversion object, otherwise fall back to stupid stringification
# Changes in Module::Metadata were causing inconsistencies in the return value,
# we are just trying to survive.
? ( version => ref $version eq "version" ? $version->stringify : ($version . '') )
: ()
}
);
Expand Down

2 comments on commit 8ec0c1e

@karenetheridge
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What inconsistencies are you seeing from Module::Metadata? ...as consistency was one of the outcomes of the new release.

@monken
Copy link
Contributor Author

@monken monken commented on 8ec0c1e May 1, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the new version is doing the right thing now. I was talking in past tense, I would feel better when I could remove the ref check and just stringify every time. However, I don't have a failing test for the old behavior.

Please sign in to comment.