From: Dave Rolsky Date: Mon, 20 Sep 2010 21:41:19 +0000 (-0500) Subject: pushing onto undef should (and does) work X-Git-Tag: 1.15~131 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e42b53ac02e0861056a5e0edb5651d16d451ee75;p=gitmo%2FMoose.git pushing onto undef should (and does) work This works (under strict/warnings with no warning output) my $x; push @{$x}, 1; --- diff --git a/t/070_native_traits/011_array_subtypes.t b/t/070_native_traits/011_array_subtypes.t index 20a312f..5daa36a 100644 --- a/t/070_native_traits/011_array_subtypes.t +++ b/t/070_native_traits/011_array_subtypes.t @@ -64,8 +64,6 @@ use Test::Exception; my $foo = Foo->new; { - dies_ok { $foo->push_array('foo') } "array - can't push onto undef"; - $foo->array( [] ); is_deeply( $foo->array, [], "array - correct contents" ); @@ -74,8 +72,6 @@ my $foo = Foo->new; } { - dies_ok { $foo->push_array_int(1) } "array_int - can't push onto undef"; - $foo->array_int( [] ); is_deeply( $foo->array_int, [], "array_int - correct contents" );