It's a little ironic that your first point concludes
there is not enough documentation, followed by reports of
problems caused by not following what documentation there
is :-)
It's your responsability to set config variables to
reasonable values. If a trailing slash breaks the domain
don't use one.
The 10th line of the code, which is documentation,
states "Can write up to 8 data files in temp dir, so give
it write permission."
The 1st config variable is $temp, which needs to be
set to a writable dir. It's just standard practice to
check the shebang line since we don't all install perl in
the same place.
Updated Excuse:
The script is provided with warnings turned off. I know
about the warnings, and decided to turn them off because
I don't always succeed in initializing variables, and despite
the fact that perl doesn't care, warnings about it can hang
the script from CGI.
You specifically address this in your next reply. I used
to think this initialized all the vars:
my($mode,$td,$ta,$rd,$ra,$ca,$cd) = '';
but you correct me with this:
my($mode,$td,$ta,$rd,$ra,$ca,$cd) = ('','','','','','','');
and I've come to use this method supplied by Masem in CB:
my($mode,$td,$ta,$rd,$ra,$ca,$cd) = map {''} (1..7);
(who also suggested split //, '0'x7 )
You last point hits a sore spot. I've lost count of how many
monks have criticized my lack of whitespace and especially
eliminating the space after 'my'.
My lack of whitespace stems from using an editor that
highlights syntax. This causes colors, and not whitespace,
to be my primary visual cue. It allows me to fit more code
on each screen while still clearly seeing what's going on.
My editor color codes 'my' and '$' the same bright blue
color, not using a space makes declarations really stand
out and look different from subsequent variable usage.
I'll look into running my code thru
perltidy, but until then
I suggest you do so if my formatting doesn't work well in
your development environment.
I do appreciate your feedback, it will help shape my
habits and hopefully make things clearer on my next
project.
--
Check out my Perlmonks Related Scripts like framechat,
reputer, and xNN.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Outside of code tags, you may need to use entities for some characters:
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|