Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Re: reputer reply

by epoptai (Curate)
on May 19, 2001 at 21:58 UTC ( #81742=note: print w/replies, xml ) Need Help??

in reply to Re: reputer reply
in thread reputer reply

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://81742]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2017-07-26 03:40 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (383 votes). Check out past polls.