{ no strict; *{"foo.bar::new"} = sub { bless {}, "foo.bar" }; } my $o = "foo.bar"->new;