<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0">
    <title>Modern Perl Books for modern Perl programming — comments</title>
    <id>tag:www.modernperlbooks.com,2011-06-07:/mt//comments</id>
    <updated>2012-02-22T18:52:15Z</updated>
    <link rel="self" href="http://www.modernperlbooks.com/mt/comments.xml" />
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.23-en</generator>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.415-comment:1193</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.415-comment:1192" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/upgrading-user-password-hashes-in-place.html#comment-1192"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/upgrading-user-password-hashes-in-place.html#comment-1193" />
    <title>Re: Upgrading User Password Hashes in Place — From: chromatic</title>
    <author>
        <name>chromatic</name>
        <uri>http://www.wgz.org/~chromatic</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.wgz.org/~chromatic">
        <![CDATA[<p>The client doesn't send hashed passwords—or if the client sends a hashed password, you have to hash it again on the server.</p>

<p>Eavesdropping and securing stored passwords are different problems.</p>]]>
    </content>
    <published>2012-02-22T18:52:15Z</published>
    <updated>2012-02-22T18:52:15Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.415-comment:1192</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.415" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/upgrading-user-password-hashes-in-place.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/upgrading-user-password-hashes-in-place.html#comment-1192" />
    <title>Re: Upgrading User Password Hashes in Place — From: Sue D. Nymme</title>
    <author>
        <name>Sue D. Nymme</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Here's something that has always bugged me.  I'm sure it must be a solved problem, but I have been unsuccessful in finding the proper practice.  It's a little bit of a tangent, but I hope you'll indulge me.</p>
<p>So your user sets his password. The client hashes the password, and sends it to your server.  You store the user ID, hashed password, and maybe the salt value.  Haha, you think, I'm safe from hackers now.</p>
<p>Haven't you just substituted hashed-passwords for passwords?</p>
<p>If someone hacks into your database and grabs user IDs, salts, and hashed-passwords, can't they just use those to log in?  Their client, instead of hashing a plaintext password, sends the hashed password.  Or say you don't get hacked, and someone eavesdrops on a user's unencrypted internet conversation.  He'd get the hashed password and be able to log in with that, no?</p>
<p>If the solution is "force https" or "have the client encrypt a packet containing the userid & hashed password", then isn't hashing the password redundant?</p>]]>
    </content>
    <published>2012-02-21T16:44:30Z</published>
    <updated>2012-02-21T16:44:30Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.415-comment:1191</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.415-comment:1190" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/upgrading-user-password-hashes-in-place.html#comment-1190"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/upgrading-user-password-hashes-in-place.html#comment-1191" />
    <title>Re: Upgrading User Password Hashes in Place — From: chromatic</title>
    <author>
        <name>chromatic</name>
        <uri>http://www.wgz.org/~chromatic</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.wgz.org/~chromatic">
        <![CDATA[<p>You're right. I found and fixed a bug in the actual code, and your approach made that easier.</p>

<p>I thought about doing things the right way when I first wrote the code, but somehow convinced myself that it wasn't worth the additional effort. Perhaps I hadn't realized then that the prefix approach would work.</p>]]>
    </content>
    <published>2012-02-21T15:34:55Z</published>
    <updated>2012-02-21T15:34:55Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.415-comment:1190</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.415" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/upgrading-user-password-hashes-in-place.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/upgrading-user-password-hashes-in-place.html#comment-1190" />
    <title>Re: Upgrading User Password Hashes in Place — From: notbenh.myopenid.com</title>
    <author>
        <name>notbenh.myopenid.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>The only thing that I can think of is why always do the old check first? I know that this is 'temp' code but it seems that if you can 'find' new passwords by prefix then you could just use that do decide what hash to match and then you would only do the hash once in the case of 'updated' passwords. </p>]]>
    </content>
    <published>2012-02-21T08:32:07Z</published>
    <updated>2012-02-21T08:32:07Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.412-comment:1189</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.412-comment:1188" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/the-values-and-costs-of-automation.html#comment-1188"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/the-values-and-costs-of-automation.html#comment-1189" />
    <title>Re: The Values and Costs of Automation — From: chromatic</title>
    <author>
        <name>chromatic</name>
        <uri>http://www.wgz.org/~chromatic</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.wgz.org/~chromatic">
        <![CDATA[<p>I use the Module::Build plugin, and even if I didn't, I don't have to work with MakeMaker directly, but point well taken.</p>]]>
    </content>
    <published>2012-02-20T20:00:45Z</published>
    <updated>2012-02-20T20:00:45Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.412-comment:1188</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.412" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/the-values-and-costs-of-automation.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/the-values-and-costs-of-automation.html#comment-1188" />
    <title>Re: The Values and Costs of Automation — From: skaufman.myopenid.com</title>
    <author>
        <name>skaufman.myopenid.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Dzil's default minting profile uses the <a href="http://search.cpan.org/~rjbs/Dist-Zilla-4.300008/lib/Dist/Zilla/PluginBundle/Basic.pm">@Basic</a> plugin bundle<br />
which includes <a href="http://search.cpan.org/perldoc?Dist::Zilla::Plugin::MakeMaker">Dist::Zilla::Plugin::MakeMaker</a> - "Dist::Zilla::Plugin::MakeMaker - build a Makefile.PL that uses ExtUtils::MakeMaker."</p>

<p>You're hating (however mildly) on something that dzil's using behind several layers of abstraction.</p>]]>
    </content>
    <published>2012-02-20T02:34:22Z</published>
    <updated>2012-02-20T02:34:22Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.414-comment:1187</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.414-comment:1184" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/install-distros-under-development-locally.html#comment-1184"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/install-distros-under-development-locally.html#comment-1187" />
    <title>Re: Install Distros Under Development Locally — From: chromatic</title>
    <author>
        <name>chromatic</name>
        <uri>http://www.wgz.org/~chromatic</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.wgz.org/~chromatic">
        <![CDATA[<p>I will now! I'd never thought to read the documentation for <a href="http://search.cpan.org/perldoc?Dist::Zilla::App::Command::install">Dist::Zilla::App::Command::install</a>.</p>]]>
    </content>
    <published>2012-02-17T08:00:03Z</published>
    <updated>2012-02-17T08:00:03Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.414-comment:1186</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.414" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/install-distros-under-development-locally.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/install-distros-under-development-locally.html#comment-1186" />
    <title>Re: Install Distros Under Development Locally — From: rjbs.manxome.org</title>
    <author>
        <name>rjbs.manxome.org</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>dzil will probably switch to defaulting to cpanm once I provide a useful mechanism for stating your cpan client pref more globally in the future</p>

<p>i.e., "someday beyond tomorrow"</p>]]>
    </content>
    <published>2012-02-17T03:04:06Z</published>
    <updated>2012-02-17T03:04:06Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.414-comment:1185</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.414" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/install-distros-under-development-locally.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/install-distros-under-development-locally.html#comment-1185" />
    <title>Re: Install Distros Under Development Locally — From: Jesse</title>
    <author>
        <name>Jesse</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>"dzil install" does have an "--install-command" option, which allows you to specify an alternative command to use for installation - "dzil install --install-command 'cpanm .'" would be pretty much equivalent to your alias.</p>]]>
    </content>
    <published>2012-02-17T01:52:24Z</published>
    <updated>2012-02-17T01:52:24Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.414-comment:1184</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.414" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/install-distros-under-development-locally.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/install-distros-under-development-locally.html#comment-1184" />
    <title>Re: Install Distros Under Development Locally — From: chris.prather.org</title>
    <author>
        <name>chris.prather.org</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Why not just use the built in dzil install?</p>

<pre>alias dzinstall='dzil install --install-command "cpanm ."'</pre>
]]>
    </content>
    <published>2012-02-17T01:46:50Z</published>
    <updated>2012-02-17T01:46:50Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.413-comment:1183</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.413" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/experts-versus-novices.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/experts-versus-novices.html#comment-1183" />
    <title>Re: Experts versus Novices — From: http://www.butteredham.com/blog/</title>
    <author>
        <name>http://www.butteredham.com/blog/</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p><em>"The tricky part is when someone's obviously doing something the wrong way [...]"</em></p>

<p>And also finding the fine line between wrong in the sense of "broken and will not work," and wrong in the sense of "a very bad way to do it that should be discouraged, even though it'll work."</p>

<p>The other day I answered a question on PerlMonks, where a guy was looking for lines in file1 that matched lines from another file.  He was doing it with nested loops, looping through file1, and then for each line from that file, looping through file2 and comparing each line.  His question wasn't about whether this was a good idea, but regarding something else that was actually broken in the code.  His nested loops would <em>work</em>; they were just a horrible way to do it.</p>

<p>Any mildly experienced Perl programmer looks at that problem and instantly thinks, "make a hash from file2 and then loop through file1 checking for the existence of keys in the hash."  That algorithm is so superior, and perl's hashes so suited to it, that it's automatic.  I felt a duty to explain that to him, but since his question wasn't actually, "Tell me what a lame noob I am at Perl," I put it as gently as possible, like, "Here's a way to do it that's much more Perlish and will work better for you."</p>

<p>It does get frustrating to help people when half your answers consist of, "Let Perl tell you the problem by using strict, warnings, and error checking."  It is painful to keep seeing code like 'open(FILE,"&lt;myfile.txt");while(&lt;FILE&gt;){'.  But answering the same basic questions over and over is part of teaching, whether you're doing it on a web forum or in a classroom.  I wrote code like that too, when I was getting started.  I like to think I got better.</p>

<p>To some extent, I think we're victims of Perl's success and staying power.  Perl newbies are still turning out 1995-style code because the books and tutorials written back then were so good that people are still learning from them!  If (God forbid) people are still coding in PHP 17 years from now, I doubt they'll be learning from the mess of code snippets that make up php.net.  But can you learn to be a productive Perl coder from the camel book today?  Absolutely.</p>]]>
    </content>
    <published>2012-02-15T00:07:02Z</published>
    <updated>2012-02-15T00:07:02Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.412-comment:1182</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.412-comment:1181" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/the-values-and-costs-of-automation.html#comment-1181"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/the-values-and-costs-of-automation.html#comment-1182" />
    <title>Re: The Values and Costs of Automation — From: chromatic</title>
    <author>
        <name>chromatic</name>
        <uri>http://www.wgz.org/~chromatic</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.wgz.org/~chromatic">
        <![CDATA[<p>Exactly. To put another way, good automations compound.</p>

<p>You see this also with the Unix command line.</p>]]>
    </content>
    <published>2012-02-14T18:51:40Z</published>
    <updated>2012-02-14T18:51:40Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.412-comment:1181</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.412" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/the-values-and-costs-of-automation.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/the-values-and-costs-of-automation.html#comment-1181" />
    <title>Re: The Values and Costs of Automation — From: dagolden.com</title>
    <author>
        <name>dagolden.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I think part of the power of Dist::Zilla that is overlooked or underappreciated by novice users is the plugin architecture and particularly user-specific plugin bundles.</p>

<p>For example, after getting about six different "you have a spelling error" bug reports sent back upstream to me from the (awesome) Debian Perl team, I decided that I needed to start spell checking my Pod.  I added a spelling plugin [1] (<em>that someone else wrote</em>) to my plugin bundle, tweaked the bundle configuration attributes to let me pass through multiple stop words, and then <em>every single distribution I release</em> has spell checking henceforth.</p>

<p>It's not about whether you can do something with Dist::Zilla versus other tools, it's about whether you want to have Dist::Zilla give you a well-architected way to manage all your distributions similarly with minimal effort (and to customize them when you need to) or whether you want to manage them all separately (or whether you want to roll your own system for doing some or all of what Dist::Zilla does).</p>

<p>The time savings comes not from converting any individual distribution, but from the cumulative compound effect of using Dist::Zilla to automate more and more things and more and more distributions over time.</p>

<p>[1] <a href="http://p3rl.org/Dist::Zilla::Plugin::Test::PodSpelling">Dist::Zilla::Plugin::Test::PodSpelling</a><br />
</p>]]>
    </content>
    <published>2012-02-14T03:27:54Z</published>
    <updated>2012-02-14T03:27:54Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.410-comment:1180</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.410-comment:1178" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/templating-with-widgets-not-primitives.html#comment-1178"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/templating-with-widgets-not-primitives.html#comment-1180" />
    <title>Re: Templating with Widgets, Not Primitives — From: chromatic</title>
    <author>
        <name>chromatic</name>
        <uri>http://www.wgz.org/~chromatic</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.wgz.org/~chromatic">
        <![CDATA[<p>I tried CSS::LESSp on a project and it didn't handle all of the Less I needed. I didn't spend much time debugging it. (Did I mention I hate writing, maintaining, and patching parsers?)</p>]]>
    </content>
    <published>2012-02-13T23:41:00Z</published>
    <updated>2012-02-13T23:41:00Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.412-comment:1179</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.412" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/the-values-and-costs-of-automation.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/the-values-and-costs-of-automation.html#comment-1179" />
    <title>Re: The Values and Costs of Automation — From: http://petdance.com/openid/</title>
    <author>
        <name>http://petdance.com/openid/</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Automating a task is only worthwhile when the benefit of automation outweighs the cost of doing so, OR when publishing that automation to the world will provide benefits for others as well.</p>

<p>When I created Module::Starter, it was partly to save myself the time and hassle of cut & paste module starting, but also to let others avoid it as well.</p>

<p>It's also worth noting that the benefits of automation aren't always based on time.  Code quality is a huge benefit, and my understanding of Dist::Zilla is that it takes care of all those little things that we tend to forget on release, eliminating the human error factors.</p>

<p>DRY (Don't Repeat Yourself) is an important principle because it reduces the chances of error.  In this respect, it applies to repeated tasks as well.</p>]]>
    </content>
    <published>2012-02-13T16:06:25Z</published>
    <updated>2012-02-13T16:06:25Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.410-comment:1178</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.410" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/templating-with-widgets-not-primitives.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/templating-with-widgets-not-primitives.html#comment-1178" />
    <title>Re: Templating with Widgets, Not Primitives — From: yanick.myopenid.com</title>
    <author>
        <name>yanick.myopenid.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>There is, incidentally, also a Perl port of LESS: <a href="http://search.cpan.org/~drinchev/CSS-LESSp-0.86/">http://search.cpan.org/~drinchev/CSS-LESSp-0.86/</a>  Its implementation has a few... scary edges, but at least they are Perl-scary, as opposed to Node.js-terrifying. </p>

<p>And on a totally sympathetic unrelated note, a segment of my latest book does involve skydiving, surfing on the lava of an erupting volcano, and dealing with gigantic tentacled land sharks... So I guess, whatever you do, don't visit Morvak 13. You won't like it. :-) </p>]]>
    </content>
    <published>2012-02-13T13:00:04Z</published>
    <updated>2012-02-13T13:00:04Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.412-comment:1177</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.412" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/the-values-and-costs-of-automation.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/the-values-and-costs-of-automation.html#comment-1177" />
    <title>Re: The Values and Costs of Automation — From: jnareb.myopenid.com</title>
    <author>
        <name>jnareb.myopenid.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>First, what to use if not EUMM if Perl code is fragment of larger project (in C mainly) that uses Makefile?</p>

<p>Second, Dist::Zilla has quite heavy dependencies... though Pod::Weaver looks like fun.  Things like automatically testing synopsis etc.</p>]]>
    </content>
    <published>2012-02-13T11:51:58Z</published>
    <updated>2012-02-13T11:51:58Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.410-comment:1176</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.410" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/templating-with-widgets-not-primitives.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/templating-with-widgets-not-primitives.html#comment-1176" />
    <title>Re: Templating with Widgets, Not Primitives — From: http://www.bsdhosting.co.za/index.html</title>
    <author>
        <name>http://www.bsdhosting.co.za/index.html</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Template::Declare seems a good fit for that style, something like:<br />
<pre><br />
template newsletter => sub {<br />
 row {<br />
       maincontent {<br />
         show( 'components/content/home_text' );<br />
      };<br />
      sideblock { show( 'components/forms/login_box' ); };<br />
      sideblock { show( 'components/boxes/top_recommendation' ); };<br />
      sideblock { show( 'components/content/newsletter_text' );  };<br />
     };<br />
};</pre></p>

<p>Template::Declare->show('newsletter');</p>


Each of login_box, top_recommendation and newsletter_text being templates defined similarly, using TD's declarative template syntax.
]]>
    </content>
    <published>2012-02-11T00:29:20Z</published>
    <updated>2012-02-11T00:29:20Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.408-comment:1175</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.408" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html#comment-1175" />
    <title>Re: A Practical Use for Macros in Perl — From: Leon Timmermans</title>
    <author>
        <name>Leon Timmermans</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I once wrote <a href="https://metacpan.org/module/Scalar::Andand">Scalar::Andand</a> for this purpose, though I consider it a horrible hack and don't really recommend it to anyone.</p>]]>
    </content>
    <published>2012-02-07T01:01:08Z</published>
    <updated>2012-02-07T01:01:08Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.408-comment:1174</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.408" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html#comment-1174" />
    <title>Re: A Practical Use for Macros in Perl — From: http://openid.tobyinkster.co.uk/tobyink</title>
    <author>
        <name>http://openid.tobyinkster.co.uk/tobyink</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Just uploaded a bit of sugar to CPAN.</p>
<pre>
use PerlX::Perform;
...

<p>while (my $stock = $stock_rs->next)<br />
{<br />
    perform { $txn->add($_) } wherever $self->analyze_pe($stock);<br />
    perform { $txn->add($_) } wherever $self->analyze_cash_yield($stock);<br />
}<br />
</p></pre><br />
<p>It assumes that analyze_pe and analyze_cash_yield perform undef or the empty list for failure. If they return a false but defined value, then the perform {...} block is still triggered.</p>]]>
    </content>
    <published>2012-02-06T21:37:14Z</published>
    <updated>2012-02-06T21:37:14Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.408-comment:1173</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.408-comment:1171" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html#comment-1171"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html#comment-1173" />
    <title>Re: A Practical Use for Macros in Perl — From: https://me.yahoo.com/mithaldu#29f3a</title>
    <author>
        <name>https://me.yahoo.com/mithaldu#29f3a</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Well, if that solution is too clever, this works too:</p>

<p>    while ( my $stock = $stock_rs->next ) {<br />
        ADD_TXN_WITH( $self, analyze_pe         => $stock, $stock_txn );<br />
        ADD_TXN_WITH( $self, analyze_cash_yield => $stock, $analysis_txn );<br />
    }<br />
    <br />
    sub ADD_TXN_WITH {<br />
        my ( $self, $method, $stock, $txn ) = @_;<br />
    <br />
        my $result = $self->$method( $stock );<br />
        $txn->add( $result ) if $result;<br />
    <br />
        return;<br />
    }</p>]]>
    </content>
    <published>2012-02-06T11:25:09Z</published>
    <updated>2012-02-06T11:25:09Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.408-comment:1172</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.408" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html#comment-1172" />
    <title>Re: A Practical Use for Macros in Perl — From: Aristotle Pagaltzis</title>
    <author>
        <name>Aristotle Pagaltzis</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>The problem here is ultimately that the declaration does not take effect until the end of the statement. Sometimes that’s an incredibly useful property but I have also often found it a hindrance. Consider:</p>

<pre>my $pe_update;
$pe_update = $self-&gt;analyze_pe( $stock ) and $stock_txn-&gt;add( $pe_update );
</pre>

<p>You can do away with the declaration, but weaving in the conditional then requires ugliness:</p>

<pre>$stock_txn-&gt;add( $_ ) for grep { $_ } $self-&gt;analyze_pe( $stock );
</pre>

<p>If we could have in Perl 5 what Perl 6 allows, namely combining two modifiers as long as one is a loop and one a conditional, then it could even look pretty nice:</p>

<pre>$stock_txn-&gt;add( $_ ) if $_ for $self-&gt;analyze_pe( $stock );
</pre>

<p>Of course object-heads will shake their heads. If analyze_foo returned an object with an add_to method you could just write this:</p>

<pre>$self-&gt;analyze_pe( $stock )-&gt;add_to( $stock_tnx );
</pre>

<p>If the analyze_foo methods return a null class instance for a thumbs-down result then polymorphism sorts it all out for you, as Kay intended.</p>

<p>In the meantime, people who know monads will be chuckling and shaking their heads, barely perceptibly.</p>]]>
    </content>
    <published>2012-02-06T09:49:33Z</published>
    <updated>2012-02-06T09:49:33Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.408-comment:1171</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.408-comment:1170" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html#comment-1170"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html#comment-1171" />
    <title>Re: A Practical Use for Macros in Perl — From: chromatic</title>
    <author>
        <name>chromatic</name>
        <uri>http://www.wgz.org/~chromatic</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.wgz.org/~chromatic">
        <![CDATA[<p>I thought about your suggestion while I was coding, but it didn't seem nicer to me. I like and use transient data structures often in situations like this, but it's more indirection than I usually want to maintain.</p>

<p>Your point about the abstraction of names without the overhead of dispatch is well taken.</p>]]>
    </content>
    <published>2012-02-06T06:27:10Z</published>
    <updated>2012-02-06T06:27:10Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.408-comment:1170</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.408" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html#comment-1170" />
    <title>Re: A Practical Use for Macros in Perl — From: https://me.yahoo.com/mithaldu#29f3a</title>
    <author>
        <name>https://me.yahoo.com/mithaldu#29f3a</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>You can have your suggested macro syntax already and have it be even nicer:</p>

<p>    while ( my $stock = $stock_rs->next ) {<br />
        $self->try_add( %$_, $stock ) for ( { pe => $stock_txn }, { cash_yield => $analysis_txn } );<br />
    }<br />
    <br />
    sub try_add {<br />
        my ( $self, $method, $txn, $stock ) = @_;<br />
    <br />
        $method = "analyze_$method";<br />
        my $result = $self->$method( $stock );<br />
        $txn->add( $result ) if $result;<br />
    <br />
        return;<br />
    }</p>

<p>That's absolutely not what Perl needs macros for, since it already has enough expressiveness to do almost anything they could do. However, that doesn't mean there's no need for them. In fact, there is a very pressing need:</p>

<p>Performance</p>

<p>In certain situations Perl's function call overhead can become a liability and necessitate code like this:</p>

<p><a href="http://dwarvis.googlecode.com/svn/trunk/lifevis/Lifevis/Viewer.pm">http://dwarvis.googlecode.com/svn/trunk/lifevis/Lifevis/Viewer.pm</a></p>

<p>In a number of places there i would've liked to not have for loops nested in for loops stretching over more than 100 lines. I would've loved to have specific actions separated into subroutines and named sensibly. However i was forced to dissolve subs into those loops because calling them was too much of a performance drain.</p>

<p>This is a perfect case where macros would've helped keep the code speedy, while also making it readable.</p>]]>
    </content>
    <published>2012-02-06T00:47:01Z</published>
    <updated>2012-02-06T00:47:01Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.408-comment:1168</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.408" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html#comment-1168" />
    <title>Re: A Practical Use for Macros in Perl — From: http://openid.tobyinkster.co.uk/tobyink</title>
    <author>
        <name>http://openid.tobyinkster.co.uk/tobyink</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>How about so called "bare loops" with next?</p>
<pre>
while (my $stock = $stock_rs->next)
{
    PE: { $txn->add( $self->analyze_pe($stock)         or next ) }
    CY: { $txn->add( $self->analyze_cash_yield($stock) or next ) }
}
</pre>
<p>Here, if analyze_pe or analyze_cash_yield return false, next is triggered <strong>before</strong> add thus jumping out of the bare loop before add ever happens.</p>]]>
    </content>
    <published>2012-02-04T14:54:59Z</published>
    <updated>2012-02-04T14:54:59Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.408-comment:1167</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.408" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html#comment-1167" />
    <title>Re: A Practical Use for Macros in Perl — From: cowens.myopenid.com</title>
    <author>
        <name>cowens.myopenid.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I may be dense, but to me this does look like a case of needing macros, but rather a case of the add_txn method force checking on the calling code.  If we look at what you consider the clearest code, we can see that what you really want is for add_txn to ignore undefs (or false values, but I suspect they are effectively the same here).   Why not modify add_txn to reject undefs?  Is there ever a case you want to add an undef to a transaction?</p>]]>
    </content>
    <published>2012-02-04T12:16:08Z</published>
    <updated>2012-02-04T12:16:08Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.408-comment:1166</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.408" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html#comment-1166" />
    <title>Re: A Practical Use for Macros in Perl — From: rcaputo.myopenid.com</title>
    <author>
        <name>rcaputo.myopenid.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Now that I've actually read what you wrote earlier about macros, Filter::Template isn't the type you're looking for.  It is one way to solve the immediate problem here, though.</p>]]>
    </content>
    <published>2012-02-03T23:36:10Z</published>
    <updated>2012-02-03T23:36:10Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.408-comment:1165</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.408" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/02/a-practical-use-for-macros-in-perl.html#comment-1165" />
    <title>Re: A Practical Use for Macros in Perl — From: rcaputo.myopenid.com</title>
    <author>
        <name>rcaputo.myopenid.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Filter::Template on CPAN allows you to do something like this:</p>

<pre>
use warnings;
use strict;

<p>sub Filter::Template::DEBUG () { 1 }<br />
use Filter::Template;</p>

<p>template ADD_TXN_WITH (analyze_object, analyze_method, analyze_stock, txn_obj) {<br />
  {<br />
    my $result = analyze_object->analyze_method( analyze_stock );<br />
    txn_obj->add( $result ) unless $result;<br />
  }<br />
}</p>

<p>{% ADD_TXN_WITH $self, analyze_pe, $stock, $stock_txn %}<br />
{% ADD_TXN_WITH $self, analyze_cash_yield, $stock, $analysis_txn %}<br />
</p></pre>

<p>A source filter registers template definitions and expands invocations inline before the program is compiled.  All the usual source-filter caveats apply until someone submits a patch to use PPI, a B module, or something even better.</p>

<p>#line directives preserve the sanity of errors and warnings.  Because DEBUG is set, the example above generates the output below.  You may need to widen your browser or shrink your font to see the full effect.</p>

<pre>
   6 |: 
   7 D: # template ADD_TXN_WITH (analyze_object, analyze_method, analyze_stock, txn_obj) {
   8 M: # mac 4:   {
   9 M: # mac 4:     my $result = analyze_object->analyze_method( analyze_stock );
  10 M: # mac 4:     txn_obj->add( $result ) unless $result;
  11 M: # mac 4:   }
  12 M: # mac 4: }
  13 |: 
  14 S: # line 14 "template ADD_TXN_WITH (defined in filter-template.pl at line 8) invoked from filter-template.pl"
  14 S: {
  14 S: # line 14 "template ADD_TXN_WITH (defined in filter-template.pl at line 9) invoked from filter-template.pl"
  14 S:     my $result = $self->analyze_pe( $stock );
  14 S: # line 14 "template ADD_TXN_WITH (defined in filter-template.pl at line 10) invoked from filter-template.pl"
  14 S:     $stock_txn->add( $result ) unless $result;
  14 S: # line 14 "template ADD_TXN_WITH (defined in filter-template.pl at line 11) invoked from filter-template.pl"
  14 S:   }
  14 S: # line 15 "filter-template.pl"
  15 S: # line 15 "template ADD_TXN_WITH (defined in filter-template.pl at line 8) invoked from filter-template.pl"
  15 S: {
  15 S: # line 15 "template ADD_TXN_WITH (defined in filter-template.pl at line 9) invoked from filter-template.pl"
  15 S:     my $result = $self->analyze_cash_yield( $stock );
  15 S: # line 15 "template ADD_TXN_WITH (defined in filter-template.pl at line 10) invoked from filter-template.pl"
  15 S:     $analysis_txn->add( $result ) unless $result;
  15 S: # line 15 "template ADD_TXN_WITH (defined in filter-template.pl at line 11) invoked from filter-template.pl"
  15 S:   }
  15 S: # line 16 "filter-template.pl"
Global symbol "$self" requires explicit package name at template ADD_TXN_WITH (defined in filter-template.pl at line 9) invoked from filter-template.pl line 14.
Global symbol "$stock" requires explicit package name at template ADD_TXN_WITH (defined in filter-template.pl at line 9) invoked from filter-template.pl line 14.
Global symbol "$stock_txn" requires explicit package name at template ADD_TXN_WITH (defined in filter-template.pl at line 10) invoked from filter-template.pl line 14.
Global symbol "$self" requires explicit package name at template ADD_TXN_WITH (defined in filter-template.pl at line 9) invoked from filter-template.pl line 15.
Global symbol "$stock" requires explicit package name at template ADD_TXN_WITH (defined in filter-template.pl at line 9) invoked from filter-template.pl line 15.
Global symbol "$analysis_txn" requires explicit package name at template ADD_TXN_WITH (defined in filter-template.pl at line 10) invoked from filter-template.pl line 15.
Execution of filter-template.pl aborted due to compilation errors.
</pre>]]>
    </content>
    <published>2012-02-03T23:32:03Z</published>
    <updated>2012-02-03T23:32:03Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.407-comment:1164</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.407" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/why-i-run-tests-on-install.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/why-i-run-tests-on-install.html#comment-1164" />
    <title>Re: Why I Run Tests on Install — From: szabgab.com</title>
    <author>
        <name>szabgab.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>tobyink, Leon, that sounds nice. I am not sure it needs to be solved for the general case. It can be a strong recommendation that tests should not assume any file present outside of t/ or that tests should have a mode to 'test against installed versions'.</p>

<p>Then some CPAN Testers could setup smokers that would test each module that way too and start reporting which ones fail in that case.</p>]]>
    </content>
    <published>2012-02-01T06:11:14Z</published>
    <updated>2012-02-01T06:11:14Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.407-comment:1163</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.407-comment:1161" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/why-i-run-tests-on-install.html#comment-1161"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/why-i-run-tests-on-install.html#comment-1163" />
    <title>Re: Why I Run Tests on Install — From: Leon Timmermans</title>
    <author>
        <name>Leon Timmermans</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>A solution for that is on my todo list for the QA hackathon, but I can't make any promises. In particular, the problem tobyink pointed out is tricky to solve, and probably requires metafile support or some such.</p>]]>
    </content>
    <published>2012-02-01T00:08:58Z</published>
    <updated>2012-02-01T00:08:58Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.407-comment:1162</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.407-comment:1161" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/why-i-run-tests-on-install.html#comment-1161"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/why-i-run-tests-on-install.html#comment-1162" />
    <title>Re: Why I Run Tests on Install — From: http://openid.tobyinkster.co.uk/tobyink</title>
    <author>
        <name>http://openid.tobyinkster.co.uk/tobyink</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p><a href="http://search.cpan.org/~tobyink/App-Reprove-0.004/">App::Reprove</a> is my solution for testing an already-installed module. You type:</p>
<pre>
reprove Foo::Bar
</pre>
<p>... at the command line, it tries to find the appropriate distribution on CPAN, downloads the MANIFEST, greps it for files matching m{^t/}, downloads those into a temporary directory and points App::Prove in their direction.</p>
<p>It's not perfect - some distributions may rely on files outside "t" to pass the tests. And sometimes it may need additional hints to find the correct distribution (e.g. version, cpanid). But it seems to work in many cases.</p>]]>
    </content>
    <published>2012-01-31T22:53:58Z</published>
    <updated>2012-01-31T22:53:58Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.407-comment:1161</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.407" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/why-i-run-tests-on-install.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/why-i-run-tests-on-install.html#comment-1161" />
    <title>Re: Why I Run Tests on Install — From: perlpilot.myopenid.com</title>
    <author>
        <name>perlpilot.myopenid.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Not running tests on installation has the nasty side effect of an end user encountering failure at some indeterminate time in the future and having very little clue about the nature of the failure.  Testing on install at least lets whoever is doing the installation know up-front that there may be problems and by requiring those tests, a human being is needed to make the call on whether or not to force the installation.  This is a good thing.</p>

<p>Though, I wonder if there is some value in making tests an installable component and providing a tool to run those tests?  At least then, the end users would have another tool to help them diagnose problems they may encounter (like when a BOFH does a force install because he's too lazy to figure out why some tests are failing).  I haven't imagined very far on this, but it would look something like this:</p>

<pre>
    User: I'm having trouble with module XYZ
    Us:   Have you tried running the test suite for that module?  
          Type "test_module XYZ" to do so.
    User: Ah, no.  Let me try that
          ... time passes ...
    User: It fails test 53.
    Us:   Run that test individually with "test_module XYZ 53" to see what's up.
    User: Ok.
    User: Ah, it's failing because an external XML lib isn't installed.
    Us:   So, you need to install that or have your sysadmin install it, 
          then you can run the tests again to make sure.
    User: thanks!
</pre>
]]>
    </content>
    <published>2012-01-31T20:47:50Z</published>
    <updated>2012-01-31T20:47:50Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1160</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1159" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1159"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1160" />
    <title>Re: Avoiding The Vendor Perl Fad Diet — From: chromatic</title>
    <author>
        <name>chromatic</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<blockquote><em>How does Java being a world of suck make it acceptable for Perl to be a world of suck?</em></blockquote>

<p>Please don't put words in my mouth.</p>

<p>Deploying software with dependencies takes effort. You can do that work by forbidding dependencies, by managing dependencies for each application individually, or by managing dependencies for all applications centrally. I prefer the second, and you prefer the latter.</p>

<p>I've worked in both situations in multiple languages: the most recent time the central approach bit me was a large Java project, where the Java ecosystem prefers application-as-big-blob-in-WAR approach but the system administrators required the build process to pull vetted dependencies and versions from a central JAR repository.</p>

<p>I grant you that this is not an example of the best way to manage centralized dependencies, but it was an act of root to get information on how to <em>use</em> the repository, let alone get a new version of a library in there. Don't even ask about how to get a new library installed.</p>

<p>The worst part was when one application relied on a library version incompatible with a newer version which contained important bugfixes our application needed.</p>

<p>I admit it's <em>possible</em> to create and maintain a centralized repository while minimizing these problems, but I've experienced its drawbacks enough that I'm leery.</p>]]>
    </content>
    <published>2012-01-31T18:41:05Z</published>
    <updated>2012-01-31T18:41:05Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1159</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1155" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1155"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1159" />
    <title>Re: Avoiding The Vendor Perl Fad Diet — From: http://openid.aliz.es/sysop</title>
    <author>
        <name>http://openid.aliz.es/sysop</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I don't understand.  How does Java being a world of suck make it acceptable for Perl to be a world of suck?  What the hell does Java's horrendous binary-distribution addiction have to do with this discussion?  I'm talking about packaging cpan, not downloading random precompiled XS modules.</p>

<p>The reason you've only seen this work in trivial situations is that not many organizations have the resources to devote enough operations time to solving the problem correctly.  We do, and so we have.  The first thing we do is break out all of the modules from the vanilla distribution, for exactly the reasons I specified, and then put everything into RPMs for distribution.</p>

<p>We also have a pretty comprehensive testing platform.  The procedure, simplified for this comment, is: update local cpan mirror, build all the modules we use (and their dependencies), fix build problems, rerun packaging scripts, upload to channel for distribution.  It's taken us a while to get it robust, and redhat's new packaging decision would enable us to skip the tedious breakout of the core packages, etc.  Periodically (I shoot for about once a month, or when it's requested by the devs, whichever comes first) we update the local cpan mirror and test the new cpan stuff, the software we use, and the software we write, and make sure it all works before we distribute it to the grids and the clusters.</p>

<p>It's nice to be able to upgrade the interpreter without rebuilding every single module it comes with.  It's nice to be able to upgrade a leaf module all the way back to root perl without having to monkey with idiotic dependency listings.  And our developers like having a perl installation they can rely on and expand.</p>

<p>Semirelated:  BSDPan is one of the greatest tools for module distribution I've ever worked with, and I hope to god that one day my HPC work and BSDPan have a chance to come together.  I could probably cut back to a four-day work week.</p>]]>
    </content>
    <published>2012-01-31T03:33:51Z</published>
    <updated>2012-01-31T03:33:51Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.406-comment:1158</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.406" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/speed-up-perlbrew-with-test-parallelism.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/speed-up-perlbrew-with-test-parallelism.html#comment-1158" />
    <title>Re: Speed up Perlbrew with Test Parallelism — From: jonswar.myopenid.com</title>
    <author>
        <name>jonswar.myopenid.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>You can also pass "--notest" to both perlbrew and cpanm to skip tests, which is even faster than running them in parallel. :)</p>

<p>Honestly, with the vastness of the CPAN Testers network, it makes no sense for the vast majority of users to run Perl and CPAN tests on their own systems.</p>

<p>The default running of CPAN tests in particular causes great harm by causing failures up the dependency chain, failures that are meaningless to most users yet cause them to back away from installing modules with multiple dependencies such as Moose and Catalyst. It encourages module developers to reduce or eliminate dependencies, aka reinvent the wheel.</p>

<p>--notest is always set on my system, and I wish it was the default for perlbrew and cpanm.<br />
</p>]]>
    </content>
    <published>2012-01-30T13:40:41Z</published>
    <updated>2012-01-30T13:40:41Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.406-comment:1157</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.406" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/speed-up-perlbrew-with-test-parallelism.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/speed-up-perlbrew-with-test-parallelism.html#comment-1157" />
    <title>Re: Speed up Perlbrew with Test Parallelism — From: autarch.urth.org</title>
    <author>
        <name>autarch.urth.org</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>You can also pass "-j N" to perlbrew directly when building a new perl. This will actually cause it to run make in parallel, which affects more than just tests.<br />
</p>]]>
    </content>
    <published>2012-01-28T05:24:25Z</published>
    <updated>2012-01-28T05:24:25Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1156</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.405" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1156" />
    <title>Re: Avoiding The Vendor Perl Fad Diet — From: andreasvoegele.com</title>
    <author>
        <name>andreasvoegele.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I use Perl amongst other things because it is usually already there no matter whether the operating system is Linux, BSD, Solaris, HP-UX or AIX.  Sometimes system administrators refuse to install other scripting languages or rather any other package.  If Perl will no longer be provided completely with a set of modules one can depend on, the advantage of being already installed will be gone.  Granted, working with the pre-installed Perl is often unpleasant and chances that Python and Ruby are also available is nowadays much higher anyway, but Perl still has got an advantage.</p>]]>
    </content>
    <published>2012-01-27T07:51:35Z</published>
    <updated>2012-01-27T07:51:35Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1155</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1154" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1154"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1155" />
    <title>Re: Avoiding The Vendor Perl Fad Diet — From: chromatic</title>
    <author>
        <name>chromatic</name>
        <uri>http://www.wgz.org/~chromatic</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.wgz.org/~chromatic">
        <![CDATA[<p>Have you ever deployed a Java application? I have. See also WAR files and Maven and Subversion repositories full of JARs and....</p>

<p>I'd like what you suggest--that you can manage application dependencies in a system-wide, one installation fits all fashion--to be true, but I've only ever seen it work in the most trivial situations.</p>]]>
    </content>
    <published>2012-01-26T16:37:06Z</published>
    <updated>2012-01-26T16:37:06Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1154</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.405" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1154" />
    <title>Re: Avoiding The Vendor Perl Fad Diet — From: http://openid.aliz.es/sysop</title>
    <author>
        <name>http://openid.aliz.es/sysop</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>You've made it clear in past discussions you're not really focused on administration, which is fine, because you're a developer.  But I'll say it anyway:</p>

<p>This was a good move by Red Hat.  local::lib and perlbrew (et al.) are great for development, embedded deployment, and so on, but when it comes to doing real-world systems administration, you need to be able to manage perl, and it doesn't like to be managed.  We tried putting site_perl on an NFS share from an Isilon system; that resulted in a massive network storm any time anything on the HPC grids fired off... which then slowed our engineer's workstations down to a crawl.  We've tried a million things, and what we finally wound up doing was handcrafting packages for ExtUtils::MakeMaker and things like it, which basically dropped into site_perl (instead of vendor_perl, where packaged goods normally fall).  </p>

<p>The thing is, ExtUtils::MakeMaker is really important for building modules.  What it's not important for is running perl programs.  Furthermore, that specific module (among others) is not necessarily tied to the version and patchlevel of the perl binary.  Perl 5.8.8 works just fine with versions of MakeMaker from far off in the distant Jetsons-like future... but because RHEL5 has MakeMaker in the perl package, you have to jump through fantastically annoying hoops to upgrade it on a 500-node grid.  </p>

<p>Now, I agree that when you run 'yum install perl' you should get the whole distribution... but the 'perl' package should be a metapackage which weakly depends on modules like MakeMaker.  That way I can use standard tools to support building newer versions of MakeMaker when some CPAN module suddenly decides it needs a newer version of that module (which often happens when CPAN dependencies are carelessly managed).</p>

<p>Redhat's only real mistake here was calling the package 'perl' instead of 'perl-runtime' or whatever the bikeshedders decide is an appropriate name.  </p>

<p>Your advice, as I mentioned at the beginning of this comment, is sound for a development platform.  There is almost nothing more annoying than finding out during a complex analysis deployment that the developer's code doesn't work because he was too clever by half -- and started dicking with perl build options to the point where his code won't run on our existing perl deployment.  </p>

<p>We have something like 2500 things installed from CPAN (no matter what the language faddists say, tons of computational science is done with perl).  Having to replicate the frequently-massive dependency trees that analytical software can have -- to the extent of including entire other languages liek fortran -- every time for every program is simply ridiculous.  A web application?  Fine, push your perlbrew to EC2 and move on.  But for large installations, you can't just maverick off into your own little development walled garden.  You have to coordinate with your systems administrators, because they generally don't have the manpower to shove your entire development stack into the configuration management... and then do it again for the next fifty programs.</p>

<p>When you're trying to do performance-critical work across hundreds or thousands of nodes, your software needs to be packable.  Distributions have tools to make software manageable, and ignoring them make life harder for everyone but you.</p>]]>
    </content>
    <published>2012-01-26T14:29:02Z</published>
    <updated>2012-01-26T14:29:02Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1153</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.405" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1153" />
    <title>Re: Avoiding The Vendor Perl Fad Diet — From: i.galic [launchpad.net]</title>
    <author>
        <name>i.galic [launchpad.net]</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>@szabgab.com: On Debuntu Ruby is nearly unusable. Especially in regard to gems.<br />
We develop heavily in PHP and run the latest, often a beta.</p>

<p>There's hardly any vendor who does not cripple a package. Some go the extra length to cripple all of them.</p>]]>
    </content>
    <published>2012-01-26T12:40:39Z</published>
    <updated>2012-01-26T12:40:39Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1152</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.405" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1152" />
    <title>Re: Avoiding The Vendor Perl Fad Diet — From: randomness.org.uk</title>
    <author>
        <name>randomness.org.uk</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>This is one of things SUN got right in Solaris. the perl they needed for system stuff was elsewhere and not in the users path.<br />
Admittedly there were issues with the perl for users as well such as using the sun compilers so it was always better to use your own perl anyway if you couldnt afford the sun compilers.  </p>]]>
    </content>
    <published>2012-01-26T09:38:25Z</published>
    <updated>2012-01-26T09:38:25Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1151</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1148" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1148"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1151" />
    <title>Re: Avoiding The Vendor Perl Fad Diet — From: https://me.yahoo.com/mjgardner#d9855</title>
    <author>
        <name>https://me.yahoo.com/mjgardner#d9855</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>szabgab: Vendors often provide -devel package containing the bits needed to build XS-based packages against system libraries.  Sometimes it's not enough, though -- Subversion for example <strong>really</strong> wants you to build its swig-based bindings from the same sources as the client, which necessitated the Alien-SVN distribution on CPAN.</p>]]>
    </content>
    <published>2012-01-26T02:23:12Z</published>
    <updated>2012-01-26T02:23:12Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1150</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1148" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1148"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1150" />
    <title>Re: Avoiding The Vendor Perl Fad Diet — From: chromatic</title>
    <author>
        <name>chromatic</name>
        <uri>http://www.wgz.org/~chromatic</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.wgz.org/~chromatic">
        <![CDATA[<p>As I wrote, this is why  <em>(vendors) need to provide packages of Perl Actual</em>. </p>

<p>Don't get caught up in the fact that people in the know <em>can</em> compile their own Perls. The entire point is that the balkanized and bowdlerized installation media Perls are only suitable for the other programs on the installation media.</p>]]>
    </content>
    <published>2012-01-25T23:02:45Z</published>
    <updated>2012-01-25T23:02:45Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1149</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.405" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1149" />
    <title>Re: Avoiding The Vendor Perl Fad Diet — From: grantmclean.myopenid.com</title>
    <author>
        <name>grantmclean.myopenid.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I don't really have a problem with vendors carving up Perl into separate packages as long as *everything* goes into one of the parts and ideally there should be an easy way to install all of those packages.</p>

<p>I've been developing and deploying Perl code on Debian for years and have had no need for perlbrew.  I'm not saying there's no place for it, merely that I have found the Debian Perl ecosystem to be 'good enough' that I haven't needed it.  Installing CPAN modules via .debs certainly makes for easy deployments.</p>

<p>szagab: In my experience Ruby is a nightmare to deploy and most people use RVM (perlbrew for Ruby) and bundle all the versioned module dependencies into the app.  In the PHP world it is common for vendor packages to lack features or fixes that would be available to someone building from source - however the typical response is to do without rather than build from source.  I don't know much about Python but have heard murmurs that vendor tools written for Python 2.x are a barrier to deployment of 3.x.</p>]]>
    </content>
    <published>2012-01-25T22:27:44Z</published>
    <updated>2012-01-25T22:27:44Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.405-comment:1148</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.405" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/avoiding-the-vendor-perl-fad-diet.html#comment-1148" />
    <title>Re: Avoiding The Vendor Perl Fad Diet — From: szabgab.com</title>
    <author>
        <name>szabgab.com</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>So what about Python, PHP and Ruby? Do developers in those languages also need to install from source or can they use the one that was supplied by the vendor?</p>

<p>What if you wanted to use mod_perl? Do you need to also compile Apache from source? What else do you need to compile from source?<br />
Do you then need to keep an eye on new releases of all these libraries and applications to apply security patches?<br />
</p>]]>
    </content>
    <published>2012-01-25T20:53:39Z</published>
    <updated>2012-01-25T20:53:39Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.404-comment:1147</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.404" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/a-decades-old-technique-to-improve-programming-languages.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/a-decades-old-technique-to-improve-programming-languages.html#comment-1147" />
    <title>Re: A Decades-Old Technique to Improve Programming Languages — From: Leon Timmermans</title>
    <author>
        <name>Leon Timmermans</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Yes, exactly. I want this, preferably yesterday. Sadly, this is not going to be easy to implement, not in the last place because it's hard to do it incrementally.</p>]]>
    </content>
    <published>2012-01-24T22:32:08Z</published>
    <updated>2012-01-24T22:32:08Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.403-comment:1146</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.403" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/imagine-if-caller-returned-stack-capturing-objects.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/imagine-if-caller-returned-stack-capturing-objects.html#comment-1146" />
    <title>Re: Imagine if caller() Returned Stack-Capturing Objects — From: Sue D. Nymme</title>
    <author>
        <name>Sue D. Nymme</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Imagine if you could goto the stack object, to effect a return from the subroutine <em>at any point</em>.</p>]]>
    </content>
    <published>2012-01-20T05:48:21Z</published>
    <updated>2012-01-20T05:48:21Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.403-comment:1145</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.403" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/imagine-if-caller-returned-stack-capturing-objects.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/imagine-if-caller-returned-stack-capturing-objects.html#comment-1145" />
    <title>Re: Imagine if caller() Returned Stack-Capturing Objects — From: ilmari.org</title>
    <author>
        <name>ilmari.org</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>This seems to be more or less exactly what <a href="https://metacpan.org/module/Devel::StackTrace">Devel::StackTrace</a> provides.</p>]]>
    </content>
    <published>2012-01-19T10:26:25Z</published>
    <updated>2012-01-19T10:26:25Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.402-comment:1144</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.402" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/testing-your-templates-and-why-it-doesnt-always-work.html"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/testing-your-templates-and-why-it-doesnt-always-work.html#comment-1144" />
    <title>Re: Testing Your Templates, and Why It Doesn&apos;t Always Work — From: https://me.yahoo.com/mithaldu#29f3a</title>
    <author>
        <name>https://me.yahoo.com/mithaldu#29f3a</name>
        
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I was talking in more general terms. Factually i'd say that if you're pushing anything to the template render that is not a simple hash/array/scalar structure you're doing something wrong; similarly, if you're using anything beyond GET/IF/LOOP instructions in the template, then you have too much logic in there as well. Text::Xslate helps because it has more useful error messages and can tell you about undefined values without getting all crazy, and because it doesn't support some of the more outlandish parts of TT.</p>

<p>HTML::Zoom takes an entirely different approach: You hand it a normal piece of HTML and then instruct it via CSS selectors to fill in, or repeat or cut out certain parts of the template. All of this happens within the Perl code, so you end up with templates that are completely testable.</p>]]>
    </content>
    <published>2012-01-19T08:55:03Z</published>
    <updated>2012-01-19T08:55:03Z</updated>

</entry>

<entry>

    <id>tag:www.modernperlbooks.com,2012:/mt//1.402-comment:1143</id>

    <thr:in-reply-to ref="tag:www.modernperlbooks.com,2012:/mt//1.402-comment:1142" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/testing-your-templates-and-why-it-doesnt-always-work.html#comment-1142"/>


    <link rel="alternate" type="text/html" href="http://www.modernperlbooks.com/mt/2012/01/testing-your-templates-and-why-it-doesnt-always-work.html#comment-1143" />
    <title>Re: Testing Your Templates, and Why It Doesn&apos;t Always Work — From: chromatic</title>
    <author>
        <name>chromatic</name>
        <uri>http://www.wgz.org/~chromatic</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.wgz.org/~chromatic">
        <![CDATA[<p>How would you rewrite this template to avoid the conditional? Am I misunderstanding--are you suggesting that the template language should not allow method calls on objects?</p>

<p>If so, I think that pushes logic too far out of templates.</p>]]>
    </content>
    <published>2012-01-18T19:19:41Z</published>
    <updated>2012-01-18T19:19:41Z</updated>

</entry>

</feed>
