Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: Basic debugging checklist

by davies (Prior)
on Mar 01, 2020 at 22:14 UTC ( #11113607=note: print w/replies, xml ) Need Help??

in reply to Re: Basic debugging checklist
in thread Basic debugging checklist

I recently got bitten by doing this. The debugging messages were going to the web page. The code was misbehaving, but no debugging messages appeared. View Source explained why - because I had used < and >, they were being interpreted as HTML tags that made no sense & were ignored. Since then, I've been using square brackets.


John Davies

Replies are listed 'Best First'.
Re^3: Basic debugging checklist
by LanX (Saint) on Mar 01, 2020 at 23:57 UTC
    yeah that's why CGI::Carp translates -> to - and so on, which makes some dumps hard to read.

    My preference to <...> over [...] stems from the fact that square brackets are easily confused as array syntax by the eye.

    I'd suggest to either double or invert the angle brackets, I doubt that <<...>> or >...< are easily confused as HTML tags.


    I was wrong with the simple doubling, this <<br>> would be a a break surrounded by angles.

    Though this might help ->...<-

    I'm open for other ASCII suggestions, i.e. avoiding unicode.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      Mostly I use the apostrophe (ASCII 39 or x27). This helps as I'm used to seeing it delimiting strings so a "missing" terminator at a line end or one with preceding space appears obvious. In those rare occurrences where this is less effective because of the prevalence of apostrophes in the data corpus I sometimes use the tilde instead (ASCII 126 or x7E). HTH.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11113607]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2023-09-23 08:11 GMT
Find Nodes?
    Voting Booth?

    No recent polls found