<?xml version="1.0" encoding="windows-1252"?>
<node id="265830" title="Re: Re: Re: Re: IYHO, what do you consider good code?" created="2003-06-13 19:27:24" updated="2005-07-27 16:44:24">
<type id="11">
note</type>
<author id="194920">
diotalevi</author>
<data>
<field name="doctext">
&lt;p&gt;I find myself using strict less and less often but only in constrained circumstances. Small scripts, stub applications for [cpan://CGI::Application], that sort of thing. If it fills half the screen its probably too long to write without strict. Maybe this just means a lot of my scripts are now less than half a page long, I'm not sure. I just know that it is occasionally easier to just throw caution to the wind. But then I am also very likely to make warnings fatal which for me is a stricter sort of strict - your code ends being *required* to operate on the data sanely or you fall over a fatal runtime error.&lt;/p&gt;&lt;hr /&gt;&lt;p&gt;Added text. I included an example of the sort of thing I'm thinking of. This could be written with strict but why bother? I also wrote [id://265667] without strict or warnings. I added them on at the end just to keep the 'use strict'/warnings people happy.&lt;/p&gt;&lt;code&gt;#!/usr/bin/perl -T
BEGIN { $root = '/users/greentechnologist.org'; }
use lib $root;
use Camp;
Camp::DataEntry
    -&gt;new( TMPL_PATH =&gt; "$root/Tmpl/",
           PARAMS =&gt; { DBH_DSN =&gt; 'dbi:Pg:dbname=...',
                       DBH_USER =&gt; '...',
                       DBH_PASS =&gt; '...',
                       DBH_OPT  =&gt; { RaiseError =&gt; 1 } } )
    -&gt;run;&lt;/code&gt;</field>
<field name="root_node">
265561</field>
<field name="parent_node">
265600</field>
</data>
</node>
