We use this pattern for immutable objects in our Perl applications, although I think our implementation is cleaner:<p><a href="http://github.com/nothingmuch/kiokudb/blob/96f9a380c715b7aa1757db8788f0df366355ba0f/lib/KiokuDB/Role/ID/Content.pm" rel="nofollow">http://github.com/nothingmuch/kiokudb/blob/96f9a380c715b7aa1...</a>