Not inlining a constructor for test since it defines its own constructor. If you are certain you don't need to inline your constructor, specify inline_constructor => 0 in your call to test->meta->make_immutable Use of uninitialized value $eg in print at test.pl line 14.