package Obj; use Moose; has 'a', is => 'ro', default => 10; package main; my $obj = Obj->new( a => 10 );