<?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: package Foo 1.00 should mirror use Foo 1.00</title>
	<atom:link href="http://www.dagolden.com/index.php/295/package-foo-1-00-should-mirror-use-foo-1-00/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dagolden.com/index.php/295/package-foo-1-00-should-mirror-use-foo-1-00/</link>
	<description>Whatever comes to mind</description>
	<lastBuildDate>Mon, 23 Jan 2012 03:43:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Ed</title>
		<link>http://www.dagolden.com/index.php/295/package-foo-1-00-should-mirror-use-foo-1-00/comment-page-1/#comment-233</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Fri, 17 Jul 2009 23:22:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagolden.com/?p=295#comment-233</guid>
		<description>I certainly agree that the version number should be specified simply, the way it currently is on the use statement.

Personally, the first additional functionality I&#039;d like to see from that is, if the version is too old, perl should stop evaluating any more code in that file, until it finds a package statement that does match (like brian d foy suggests) or it reaches EOF.  That way, it doesn&#039;t have to compile all of the packages until it finds one that works.

With the version being set separately from the package declaration, one cannot necessarily do that effectively, because the $VERSION might not be at the top (I&#039;ve worked with one individual who liked to set his $VERSION as the last thing in the module, so that he doesn&#039;t need a 1; at the end.)</description>
		<content:encoded><![CDATA[<p>I certainly agree that the version number should be specified simply, the way it currently is on the use statement.</p>
<p>Personally, the first additional functionality I'd like to see from that is, if the version is too old, perl should stop evaluating any more code in that file, until it finds a package statement that does match (like brian d foy suggests) or it reaches EOF.  That way, it doesn't have to compile all of the packages until it finds one that works.</p>
<p>With the version being set separately from the package declaration, one cannot necessarily do that effectively, because the $VERSION might not be at the top (I've worked with one individual who liked to set his $VERSION as the last thing in the module, so that he doesn't need a 1; at the end.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david</title>
		<link>http://www.dagolden.com/index.php/295/package-foo-1-00-should-mirror-use-foo-1-00/comment-page-1/#comment-232</link>
		<dc:creator>david</dc:creator>
		<pubDate>Fri, 17 Jul 2009 20:41:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagolden.com/?p=295#comment-232</guid>
		<description>I discussed that at YAPC with Rob Kinyon a bit.  I think it gets too tricky if multiple point in the code are using your module with different version requests.  Either conflicts are fatal, which means code in file A breaks because file B asked for a newer version of Foo, which seems brittle, or else all code is loaded into versioned-namespaces.  But that gets tricky for method resolution, as methods could be called on objects outside a scope that requested Foo of a particular version.  Objects would need to be blessed not just into a namespace, but into a namespace and version.  bless $self, &quot;Foo&quot;, 1.00;

I think it&#039;s something to consider, but I suspect it&#039;s going to be too tricky to wedge into Perl 5.</description>
		<content:encoded><![CDATA[<p>I discussed that at YAPC with Rob Kinyon a bit.  I think it gets too tricky if multiple point in the code are using your module with different version requests.  Either conflicts are fatal, which means code in file A breaks because file B asked for a newer version of Foo, which seems brittle, or else all code is loaded into versioned-namespaces.  But that gets tricky for method resolution, as methods could be called on objects outside a scope that requested Foo of a particular version.  Objects would need to be blessed not just into a namespace, but into a namespace and version.  bless $self, "Foo", 1.00;</p>
<p>I think it's something to consider, but I suspect it's going to be too tricky to wedge into Perl 5.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian d foy</title>
		<link>http://www.dagolden.com/index.php/295/package-foo-1-00-should-mirror-use-foo-1-00/comment-page-1/#comment-231</link>
		<dc:creator>brian d foy</dc:creator>
		<pubDate>Fri, 17 Jul 2009 18:52:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagolden.com/?p=295#comment-231</guid>
		<description>If we can attach a version number to a package, the first thing I would want to do is distribution many versions of the code in the same file:

&lt;code&gt;
package Foo 0.80;

# really old code 

package Foo 0.90;

# slightly newer code

package Foo 1.00;

# the latest code
&lt;code&gt;

Then, when I have &lt;code&gt;use&lt;/code&gt;, it would pick the right package and version.

In Perl 6 land, I would want to extend this to author metadata too, but still have the ability to put it all in one file.

This would me an extra scratchpad somewhere as perl compiles all of it or somehow scans through it to find the one to load.</description>
		<content:encoded><![CDATA[<p>If we can attach a version number to a package, the first thing I would want to do is distribution many versions of the code in the same file:</p>
<p><code><br />
package Foo 0.80;</p>
<p># really old code </p>
<p>package Foo 0.90;</p>
<p># slightly newer code</p>
<p>package Foo 1.00;</p>
<p># the latest code<br />
</code><code></p>
<p>Then, when I have </code><code>use</code>, it would pick the right package and version.</p>
<p>In Perl 6 land, I would want to extend this to author metadata too, but still have the ability to put it all in one file.</p>
<p>This would me an extra scratchpad somewhere as perl compiles all of it or somehow scans through it to find the one to load.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chromatic</title>
		<link>http://www.dagolden.com/index.php/295/package-foo-1-00-should-mirror-use-foo-1-00/comment-page-1/#comment-230</link>
		<dc:creator>chromatic</dc:creator>
		<pubDate>Fri, 17 Jul 2009 16:42:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagolden.com/?p=295#comment-230</guid>
		<description>I&#039;m no fan of the Perl 6 style version moniker in Perl 5 myself; I prefer your version.

There are two arguments for the Perl 6 style.  The first, as you mention, is convergence between Perl 5 and Perl 6.  It&#039;s possible to take that too far; :ver(1.01) is already different from :ver.

The second is that the adverbial syntax lends itself to further extension.  Adding an :author moniker is easier with the Perl 6 style syntax.

Aesthetics and uniformity with the use directive are two arguments against it.  I&#039;m not sure which I prefer.</description>
		<content:encoded><![CDATA[<p>I'm no fan of the Perl 6 style version moniker in Perl 5 myself; I prefer your version.</p>
<p>There are two arguments for the Perl 6 style.  The first, as you mention, is convergence between Perl 5 and Perl 6.  It's possible to take that too far; :ver(1.01) is already different from :ver.</p>
<p>The second is that the adverbial syntax lends itself to further extension.  Adding an :author moniker is easier with the Perl 6 style syntax.</p>
<p>Aesthetics and uniformity with the use directive are two arguments against it.  I'm not sure which I prefer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ovid</title>
		<link>http://www.dagolden.com/index.php/295/package-foo-1-00-should-mirror-use-foo-1-00/comment-page-1/#comment-229</link>
		<dc:creator>Ovid</dc:creator>
		<pubDate>Fri, 17 Jul 2009 14:34:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagolden.com/?p=295#comment-229</guid>
		<description>I would love to have an optional syntax which states &quot;use this version of a module, but warn me if we get a newer version&quot;.  This would mitigate a recurrent problem we have in our rather large code base where someone updates a module and things break in unexpected ways.

As a bonus, it would search &lt;code&gt;@INC&lt;/code&gt; for the right version, but that would be problematic as it would have to potentially load and discard packages several times.  As I&#039;ve discovered in the past, this is not only slow, but also prone to segfaults.  If only Ingy&#039;s &lt;code&gt;only&lt;/code&gt; module was more robust :/</description>
		<content:encoded><![CDATA[<p>I would love to have an optional syntax which states "use this version of a module, but warn me if we get a newer version".  This would mitigate a recurrent problem we have in our rather large code base where someone updates a module and things break in unexpected ways.</p>
<p>As a bonus, it would search <code>@INC</code> for the right version, but that would be problematic as it would have to potentially load and discard packages several times.  As I've discovered in the past, this is not only slow, but also prone to segfaults.  If only Ingy's <code>only</code> module was more robust :/</p>
]]></content:encoded>
	</item>
</channel>
</rss>

