Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.


In reply to Re: Re: reputer reply by epoptai
in thread reputer reply by epoptai

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found