<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-8877785637728778345.post8593746539098019425..comments</id><updated>2009-05-18T07:51:13.115-04:00</updated><title type='text'>Comments on sartak: Moose's Metaobject Protocol: Foray</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.sartak.org/feeds/8593746539098019425/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8877785637728778345/8593746539098019425/comments/default'/><link rel='alternate' type='text/html' href='http://blog.sartak.org/2009/05/mooses-meta-object-protocol-foray.html'/><author><name>Shawn M Moore</name><uri>http://www.blogger.com/profile/01037423036129960255</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8877785637728778345.post-7094095579422887588</id><published>2009-05-18T07:51:00.000-04:00</published><updated>2009-05-18T07:51:00.000-04:00</updated><title type='text'>I think between B::Hooks::EndOfScope and B::Hooks:...</title><content type='html'>I think between B::Hooks::EndOfScope and B::Hooks::OP::Check::StashChange we could do this pretty well - you'd use them to figure out when your file finishes or changes package and then use Devel::Declare to inject a lump of code that does the immutable call.&lt;br /&gt;&lt;br /&gt;I'm not entirely convinced this level of magic is worth it outside of something like MooseX::Declare though.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8877785637728778345/8593746539098019425/comments/default/7094095579422887588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8877785637728778345/8593746539098019425/comments/default/7094095579422887588'/><link rel='alternate' type='text/html' href='http://blog.sartak.org/2009/05/mooses-meta-object-protocol-foray.html?showComment=1242647460000#c7094095579422887588' title=''/><author><name>Matt</name><uri>http://www.blogger.com/profile/04490146750997291286</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sartak.org/2009/05/mooses-meta-object-protocol-foray.html' ref='tag:blogger.com,1999:blog-8877785637728778345.post-8593746539098019425' source='http://www.blogger.com/feeds/8877785637728778345/posts/default/8593746539098019425' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-8877785637728778345.post-7630286320178950417</id><published>2009-05-17T20:44:00.000-04:00</published><updated>2009-05-17T20:44:00.000-04:00</updated><title type='text'>zby, make_immutable is not the default because we ...</title><content type='html'>zby, make_immutable is not the default because we simply don't know when you're done building your class. We have no useful hook for "falling off the file". There is &lt;A HREF="http://search.cpan.org/~flora/B-Hooks-EndOfScope/lib/B/Hooks/EndOfScope.pm" REL="nofollow"&gt;B::Hooks::EndOfScope&lt;/A&gt;, but that is a compile-time hook. At the end of your class's compile-time, the only entities that have been created are subroutines. Class-building functions like "has", method modifiers, and even "extends" all take effect at runtime.&lt;br /&gt;&lt;br /&gt;"no Moose" occurs during compile time (just like "use Moose" does) so we can't make_immutable at "no Moose" time.&lt;br /&gt;&lt;br /&gt;I'm sure this problem can be overcome, since Moose as of a few versions ago unconditionally depends on XS.&lt;br /&gt;&lt;br /&gt;&lt;A HREF="http://search.cpan.org/~flora/MooseX-Declare/lib/MooseX/Declare.pm" REL="nofollow"&gt;MooseX::Declare&lt;/A&gt; can get away with making make_immutable the default, because it does have such a hook (which is "when the class-generator coderef returns").</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8877785637728778345/8593746539098019425/comments/default/7630286320178950417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8877785637728778345/8593746539098019425/comments/default/7630286320178950417'/><link rel='alternate' type='text/html' href='http://blog.sartak.org/2009/05/mooses-meta-object-protocol-foray.html?showComment=1242607440000#c7630286320178950417' title=''/><author><name>Shawn M Moore</name><uri>http://www.blogger.com/profile/01037423036129960255</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14405736564822914768'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sartak.org/2009/05/mooses-meta-object-protocol-foray.html' ref='tag:blogger.com,1999:blog-8877785637728778345.post-8593746539098019425' source='http://www.blogger.com/feeds/8877785637728778345/posts/default/8593746539098019425' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-8877785637728778345.post-2354286522603121471</id><published>2009-05-17T18:22:00.000-04:00</published><updated>2009-05-17T18:22:00.000-04:00</updated><title type='text'>I guess this question could be only justified by t...</title><content type='html'>I guess this question could be only justified by the excellence (bordering on the area of magic for me) of other parts of Moose - but why this &amp;quot;__PACKAGE__-&amp;gt;meta-&amp;gt;make_immutable;&amp;quot; is not yet made a default?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8877785637728778345/8593746539098019425/comments/default/2354286522603121471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8877785637728778345/8593746539098019425/comments/default/2354286522603121471'/><link rel='alternate' type='text/html' href='http://blog.sartak.org/2009/05/mooses-meta-object-protocol-foray.html?showComment=1242598920000#c2354286522603121471' title=''/><author><name>zby</name><uri>http://www.blogger.com/profile/04636763782334128869</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sartak.org/2009/05/mooses-meta-object-protocol-foray.html' ref='tag:blogger.com,1999:blog-8877785637728778345.post-8593746539098019425' source='http://www.blogger.com/feeds/8877785637728778345/posts/default/8593746539098019425' type='text/html'/></entry></feed>