From: Shawn M Moore Date: Tue, 9 Dec 2008 04:01:30 +0000 (+0000) Subject: Test for init_arg => undef X-Git-Tag: 0.19~122 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=6d46df7af00723bd7a0972abf5e5d62481ff6435 Test for init_arg => undef --- diff --git a/t/022-init-arg.t b/t/022-init-arg.t index 07c221d..ca65fbc 100644 --- a/t/022-init-arg.t +++ b/t/022-init-arg.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 11; do { package Class; @@ -43,3 +43,7 @@ do { my $foo = Foo->new(name => 'joe'); is($foo->name, 'default', 'init_arg => undef ignores attribute name in the constructor'); +Foo->meta->make_immutable; + +my $bar = Foo->new(name => 'joe'); +is($bar->name, 'default', 'init_arg => undef ignores attribute name in the inlined constructor');