<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Perl Module Monday: AutoRole</title>
	<atom:link href="http://www.dereferenced.com/2011/08/09/perl-module-monday-autorole/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dereferenced.com/2011/08/09/perl-module-monday-autorole/</link>
	<description>A preponderance of Perl, an excess of XML, and additional alliterations.</description>
	<lastBuildDate>Thu, 19 Jan 2012 08:50:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Paul Seamons</title>
		<link>http://www.dereferenced.com/2011/08/09/perl-module-monday-autorole/comment-page-1/#comment-1065</link>
		<dc:creator>Paul Seamons</dc:creator>
		<pubDate>Wed, 10 Aug 2011 15:47:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.dereferenced.com/?p=172#comment-1065</guid>
		<description>Cool modules.
Main differences I can see is that Exporter::Declare is more akin to Sub::Exporter.  Role::Tiny is closer to AutoRole.  If you don&#039;t need method renaming you can always just use autouse which has been core with perl for some time.

Role::Tiny is nice but there are a few differences.  AutoRole doesn&#039;t load the remote module by default (unless explicitly asked or unless the list of imported methods is dynamic).  Role::Tiny still requires being used in the imported class.  AutoRole dies when there are method conflicts rather than silently ignoring them.  To match the silent ignore method listed in the Role::Tiny POD where Role::Tiny choose to not import sub foo because it was already defined - you&#039;d have to do something like this with AutoRole:

use AutoRole &#039;Some::Role&#039; =&gt; qr{^(?!foo$).};
 # imports all methods that don&#039;t equal foo

And yes AutoRole is still at .03 because there haven&#039;t been any reasons to update it.  Version .04 will probably remove internal use of strict and warnings since we haven&#039;t had any reports of spurious warnings and it would cut out 5 or 6 lines (and autouse doesn&#039;t use strict either).</description>
		<content:encoded><![CDATA[<p>Cool modules.<br />
Main differences I can see is that Exporter::Declare is more akin to Sub::Exporter.  Role::Tiny is closer to AutoRole.  If you don&#8217;t need method renaming you can always just use autouse which has been core with perl for some time.</p>
<p>Role::Tiny is nice but there are a few differences.  AutoRole doesn&#8217;t load the remote module by default (unless explicitly asked or unless the list of imported methods is dynamic).  Role::Tiny still requires being used in the imported class.  AutoRole dies when there are method conflicts rather than silently ignoring them.  To match the silent ignore method listed in the Role::Tiny POD where Role::Tiny choose to not import sub foo because it was already defined &#8211; you&#8217;d have to do something like this with AutoRole:</p>
<p>use AutoRole &#8216;Some::Role&#8217; =&gt; qr{^(?!foo$).};<br />
 # imports all methods that don&#8217;t equal foo</p>
<p>And yes AutoRole is still at .03 because there haven&#8217;t been any reasons to update it.  Version .04 will probably remove internal use of strict and warnings since we haven&#8217;t had any reports of spurious warnings and it would cut out 5 or 6 lines (and autouse doesn&#8217;t use strict either).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rjray</title>
		<link>http://www.dereferenced.com/2011/08/09/perl-module-monday-autorole/comment-page-1/#comment-1056</link>
		<dc:creator>rjray</dc:creator>
		<pubDate>Tue, 09 Aug 2011 20:44:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.dereferenced.com/?p=172#comment-1056</guid>
		<description>Caleb: I agree, and I hope to do more along those lines in future posts. But sometimes (like last night) I have only a little time to write and still make it under the &quot;Monday&quot; wire. (And in fact, last night I failed by about 2 minutes!)

mst: Thanks! I&#039;ll take a look at Exporter::Declare, and maybe follow all of this up with a &quot;shoot-out&quot; sort of posting, that compares all of the solutions feature-by-feature.</description>
		<content:encoded><![CDATA[<p>Caleb: I agree, and I hope to do more along those lines in future posts. But sometimes (like last night) I have only a little time to write and still make it under the &#8220;Monday&#8221; wire. (And in fact, last night I failed by about 2 minutes!)</p>
<p>mst: Thanks! I&#8217;ll take a look at Exporter::Declare, and maybe follow all of this up with a &#8220;shoot-out&#8221; sort of posting, that compares all of the solutions feature-by-feature.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Caleb Cushing ( xenoterracide )</title>
		<link>http://www.dereferenced.com/2011/08/09/perl-module-monday-autorole/comment-page-1/#comment-1053</link>
		<dc:creator>Caleb Cushing ( xenoterracide )</dc:creator>
		<pubDate>Tue, 09 Aug 2011 14:12:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.dereferenced.com/?p=172#comment-1053</guid>
		<description>be nice to have a code example.</description>
		<content:encoded><![CDATA[<p>be nice to have a code example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt S Trout</title>
		<link>http://www.dereferenced.com/2011/08/09/perl-module-monday-autorole/comment-page-1/#comment-1052</link>
		<dc:creator>Matt S Trout</dc:creator>
		<pubDate>Tue, 09 Aug 2011 08:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.dereferenced.com/?p=172#comment-1052</guid>
		<description>You might also want to look at Moo - which contains a Role::Tiny for ultimate minimalism.

Plus Exporter::Declare is really rather nice too.

-- mst</description>
		<content:encoded><![CDATA[<p>You might also want to look at Moo &#8211; which contains a Role::Tiny for ultimate minimalism.</p>
<p>Plus Exporter::Declare is really rather nice too.</p>
<p>&#8211; mst</p>
]]></content:encoded>
	</item>
</channel>
</rss>
