use strict;
use warnings;
+use Carp ();
use Devel::GlobalDestruction ();
use MRO::Compat ();
use Scalar::Util ();
use if ( not our $__mx_is_compiled ), 'Moose::Meta::Class';
use if ( not our $__mx_is_compiled ), metaclass => 'Moose::Meta::Class';
-our $VERSION = '1.12';
+our $VERSION = '1.25';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
}
return { %{ $_[0] } };
}
+ elsif ( @_ % 2 ) {
+ Carp::carp(
+ "The new() method for $class expects a hash reference or a key/value list."
+ . " You passed an odd number of arguments" );
+ return { @_, undef };
+ }
else {
return {@_};
}