use Carp 'confess';
use Scalar::Util 'blessed', 'reftype', 'weaken';
-our $VERSION = '0.11';
+our $VERSION = '0.12';
our $AUTHORITY = 'cpan:STEVAN';
sub meta {
$options{init_arg} = $name
if not exists $options{init_arg};
+ (is_default_a_coderef(\%options))
+ || confess("References are not allowed as default values, you must ".
+ "wrap then in a CODE reference (ex: sub { [] } and not [])")
+ if exists $options{default} && ref $options{default};
+
bless {
name => $name,
accessor => $options{accessor},