The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Changes 03
LICENSE 33
MANIFEST 01
META.json 56
META.yml 44
Makefile.PL 2714
lib/Hash/MultiValue.pm 1015
t/release-pod-syntax.t 32
8 files changed (This is a version diff) 5248
@@ -1,5 +1,8 @@
 Revision history for Perl extension Hash::MultiValue
 
+0.16  2015-02-17 08:39:35 CET
+        - a few microƶptimisations
+
 0.15  2013-06-03 01:45:46 JST
         - use MakeMaker
 
@@ -1,4 +1,4 @@
-This software is copyright (c) 2013 by Tatsuhiko Miyagawa <miyagawa@bulknews.net>.
+This software is copyright (c) 2015 by Tatsuhiko Miyagawa <miyagawa@bulknews.net>.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@ b) the "Artistic License"
 
 --- The GNU General Public License, Version 1, February 1989 ---
 
-This software is Copyright (c) 2013 by Tatsuhiko Miyagawa <miyagawa@bulknews.net>.
+This software is Copyright (c) 2015 by Tatsuhiko Miyagawa <miyagawa@bulknews.net>.
 
 This is free software, licensed under:
 
@@ -272,7 +272,7 @@ That's all there is to it!
 
 --- The Artistic License 1.0 ---
 
-This software is Copyright (c) 2013 by Tatsuhiko Miyagawa <miyagawa@bulknews.net>.
+This software is Copyright (c) 2015 by Tatsuhiko Miyagawa <miyagawa@bulknews.net>.
 
 This is free software, licensed under:
 
@@ -1,3 +1,4 @@
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.030.
 Changes
 LICENSE
 MANIFEST
@@ -4,7 +4,7 @@
       "Tatsuhiko Miyagawa <miyagawa@bulknews.net>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Milla version v1.0.2, Dist::Zilla version 4.300034, CPAN::Meta::Converter version 2.131490",
+   "generated_by" : "Dist::Zilla version 5.030, Dist::Milla version v1.0.14, CPAN::Meta::Converter version 2.143240",
    "license" : [
       "perl_5"
    ],
@@ -26,11 +26,12 @@
    "prereqs" : {
       "configure" : {
          "requires" : {
-            "ExtUtils::MakeMaker" : "6.30"
+            "ExtUtils::MakeMaker" : "0"
          }
       },
       "develop" : {
          "requires" : {
+            "Dist::Milla" : "v1.0.14",
             "Test::Pod" : "1.41"
          }
       },
@@ -57,13 +58,13 @@
          "web" : "https://github.com/miyagawa/Hash-MultiValue"
       }
    },
-   "version" : "0.15",
+   "version" : "0.16",
    "x_contributors" : [
       "Aristotle Pagaltzis <pagaltzis@gmx.de>",
+      "chansen <chansen@cpan.org>",
       "Hans Dieter Pearcey <hdp@weftsoar.net>",
       "Peter Rabbitson <ribasushi@cpan.org>",
-      "Tatsuhiko Miyagawa <miyagawa@gmail.com>",
-      "chansen <chansen@cpan.org>"
+      "Tatsuhiko Miyagawa <miyagawa@gmail.com>"
    ]
 }
 
@@ -5,9 +5,9 @@ author:
 build_requires:
   Test::More: 0
 configure_requires:
-  ExtUtils::MakeMaker: 6.30
+  ExtUtils::MakeMaker: 0
 dynamic_config: 0
-generated_by: 'Dist::Milla version v1.0.2, Dist::Zilla version 4.300034, CPAN::Meta::Converter version 2.131490'
+generated_by: 'Dist::Zilla version 5.030, Dist::Milla version v1.0.14, CPAN::Meta::Converter version 2.143240'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -27,10 +27,10 @@ resources:
   bugtracker: https://github.com/miyagawa/Hash-MultiValue/issues
   homepage: https://github.com/miyagawa/Hash-MultiValue
   repository: https://github.com/miyagawa/Hash-MultiValue.git
-version: 0.15
+version: 0.16
 x_contributors:
   - 'Aristotle Pagaltzis <pagaltzis@gmx.de>'
+  - 'chansen <chansen@cpan.org>'
   - 'Hans Dieter Pearcey <hdp@weftsoar.net>'
   - 'Peter Rabbitson <ribasushi@cpan.org>'
   - 'Tatsuhiko Miyagawa <miyagawa@gmail.com>'
-  - 'chansen <chansen@cpan.org>'
@@ -1,59 +1,46 @@
 
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.030.
 use strict;
 use warnings;
 
 use 5.008001;
 
-use ExtUtils::MakeMaker 6.30;
+use ExtUtils::MakeMaker;
 
 
 
 my %WriteMakefileArgs = (
   "ABSTRACT" => "Store multiple values per key",
   "AUTHOR" => "Tatsuhiko Miyagawa <miyagawa\@bulknews.net>",
-  "BUILD_REQUIRES" => {},
   "CONFIGURE_REQUIRES" => {
-    "ExtUtils::MakeMaker" => "6.30"
+    "ExtUtils::MakeMaker" => 0
   },
   "DISTNAME" => "Hash-MultiValue",
   "EXE_FILES" => [],
   "LICENSE" => "perl",
+  "MIN_PERL_VERSION" => "5.008001",
   "NAME" => "Hash::MultiValue",
   "PREREQ_PM" => {},
   "TEST_REQUIRES" => {
     "Test::More" => 0
   },
-  "VERSION" => "0.15",
+  "VERSION" => "0.16",
   "test" => {
     "TESTS" => "t/*.t"
   }
 );
 
 
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
-  my $tr = delete $WriteMakefileArgs{TEST_REQUIRES};
-  my $br = $WriteMakefileArgs{BUILD_REQUIRES};
-  for my $mod ( keys %$tr ) {
-    if ( exists $br->{$mod} ) {
-      $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod};
-    }
-    else {
-      $br->{$mod} = $tr->{$mod};
-    }
-  }
-}
+my %FallbackPrereqs = (
+  "ExtUtils::MakeMaker" => 0,
+  "Test::More" => 0
+);
 
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
-  my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
-  my $pp = $WriteMakefileArgs{PREREQ_PM};
-  for my $mod ( keys %$br ) {
-    if ( exists $pp->{$mod} ) {
-      $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
-    }
-    else {
-      $pp->{$mod} = $br->{$mod};
-    }
-  }
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+  delete $WriteMakefileArgs{TEST_REQUIRES};
+  delete $WriteMakefileArgs{BUILD_REQUIRES};
+  $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
 }
 
 delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
@@ -3,7 +3,7 @@ package Hash::MultiValue;
 use strict;
 no warnings 'void';
 use 5.006_002;
-our $VERSION = '0.15';
+our $VERSION = '0.16';
 
 use Carp ();
 use Scalar::Util qw(refaddr);
@@ -51,14 +51,14 @@ sub new {
     my $class = shift;
     my $self = $class->create;
     unshift @_, $self;
-    goto &{ $self->can('merge_flat') };
+    &{ $self->can('merge_flat') };
 }
 
 sub from_mixed {
     my $class = shift;
     my $self = $class->create;
     unshift @_, $self;
-    goto &{ $self->can('merge_mixed') };
+    &{ $self->can('merge_mixed') };
 }
 
 sub DESTROY {
@@ -158,11 +158,16 @@ sub merge_mixed {
     $hash = shift if @_ == 1;
 
     while ( my ($key, $value) = @_ ? splice @_, 0, 2 : each %$hash ) {
-        my @value = CORE::ref($value) eq 'ARRAY' ? @$value : $value;
-        next if not @value;
-        $self->{$key} = $value[-1];
-        push @$k, ($key) x @value;
-        push @$v, @value;
+        if ( CORE::ref($value) eq 'ARRAY' ) {
+            next if not @$value;
+            push @$k, ($key) x @$value;
+            push @$v, @$value;
+        }
+        else {
+            push @$k, $key;
+            push @$v, $value;
+        }
+        $self->{$key} = $v->[-1];
     }
 
     $self;
@@ -238,7 +243,7 @@ sub as_hashref_mixed {
     \%hash;
 }
 
-sub mixed { $_[0]->as_hashref_mixed }
+*mixed = \&as_hashref_mixed;
 
 sub as_hashref_multi {
     my $self = shift;
@@ -252,7 +257,7 @@ sub as_hashref_multi {
     \%hash;
 }
 
-sub multi { $_[0]->as_hashref_multi }
+*multi = \&as_hashref_multi;
 
 sub STORABLE_freeze {
     my $self = shift;
@@ -7,9 +7,8 @@ BEGIN {
   }
 }
 
+# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
 use Test::More;
-
-eval "use Test::Pod 1.41";
-plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
+use Test::Pod 1.41;
 
 all_pod_files_ok();