http://www.perlmonks.org?node_id=225068


in reply to Two tips for developing with HTML::Template

I forget now what the third eval catches, but it did catch something odd for me once, so I recommend it.

Easy there, Cowboy. You're tripping over yourself in your haste to start a cargo cult!

How about an update detailing what, exactly, this last eval catches?

Matt

Update: My use of the loaded term "cargo cult" is not aimed at our esteemable dws; rather, I was using it as a humorous way to describe the hordes of followers that might use that third eval without every troubling themselves over why they were using it.

Replies are listed 'Best First'.
Re: Re: Two tips for developing with HTML::Template
by dws (Chancellor) on Jan 07, 2003 at 20:53 UTC
    How about an update detailing what, exactly, this last eval catches?

    If you trace out what HTML::Template::output() does, you'll see that there are a lot of die()s sprinkled about. The eval will catch any one of them.

    There's nothing cargo-cultish about catching and redirecting errors. The technique is independent of any one particular error.

      There's nothing cargo-cultish about catching and redirecting errors. The technique is independent of any one particular error.

      I see your point, but I suppose it depends on the level of analysis and the type of error. "cargo cult programming", as I understand it, is when a programmer repeatedly uses a chunk of code or a technique without ever really understanding why they are doing so.

      So on one level "catching errors" might suffice as an explanation for a programmer doing what you suggest; on a deeper level, however, that explanation might not be satisfactory if the programmer has no idea where the errors originate or why. (my broad definition would even include tried and true techniques such as using stict without ever understanding the utility or purpose of its usage.)

      Anyway -- my first comment was not meant so much as critcism as it was a colorful way to express my curiousity -- when you stated that it "caught something odd once" I was interested in hearing more information about the rare beast in question.

      Matt

      P.S. If my notion of "cargo cult" is incorrect, then please feel free to ignore my cargo cultish use of the phrase "cargo cult." ;)