CGI::Carp
by SuperCruncher (Pilgrim) on Jul 08, 2000 at 21:10 UTC
|
A lot of monks here strongly recommend the use of -w (however,
the use warnings pragma should now be used) and use strict.
Something I think that most people haven't touched on is the usefulness of the CGI::Carp
module. When you've been writing a CGI script, how many times has it run from the shell fine, only
to give you the dreaded '500 Internal Server Error'. CGI::Carp writes a $SIG{__DIE__} handler so that
die() calls are handled fine, and you get the same sort of error message in your browser that you
would when running your script from the shell.
So, make sure you:
use CGI::Carp qw(fatalsToBrowser)
in all your CGI scripts. It has saved me literally HOURS
of debugging time.
| [reply] [d/l] |
|
I wholeheartedly agree with one minor reservation: remember that this is a development tool. Using CGI::Carp qw(fatalsToBrowser) in production can reveal a lot of information to a would-be hacker in the event that he/she can crash your script. Don't leave it in there!
| [reply] |
|
| [reply] |
|
My understanding is that as of 5.6 -w on the command
line and
use warnings in your code are identical. Both "enable many useful warnings".
As of 5.6 (maybe earlier, I'm not sure) there is a -W
command line option
that will "enable all warnings". I do not know if there is
a use equivalent to -W.
| [reply] |
|
|
RE: Reviews Quest
by Ovid (Cardinal) on Jul 07, 2000 at 19:42 UTC
|
Hmm... I have a book I'd love to do a review on: "Perl and CGI for the World Wide Web" by Elizabeth Castro. However, the review would be, amongst other things, a warning with examples as to why it should be avoided. The Quest is a review "for your favorite module, book," etc. I think a review of a poorly done work, if handled properly, would be appropriate. I assume that no one objects?
The link Reviews Section actually heads to a post requesting that a Reviews (that's the good link) area be set up.
Oh, I see from rereading the Quest that I can post a review about my favorite PM user. I wonder how much I can write about me before the contest deadline :)
Update: I see that vroom has noted that it's okay to write a negative review if we feel the need (I wonder if that was up there before and I simply missed it?). Also, I've noticed that my review of Castro's book is going on longer than I intended. I think it's going to turn into my largest post of all time if I'm not careful with the editing :(
Update #2: I have finished the review (work was a bit slow today). You can find it at this link.
Cheers,
Ovid | [reply] |
|
I think that a review of something to be avoided would be very helpful, actually.
I dont know what other people feel, but I personally see either a good or bad review as being worthwhile to read - I wouldnt want to buy a lame book, and if I saw a well written post about why book A is bad, I would be very grateful
Regards,
spectre
| [reply] |
RE: Reviews Quest
by ivory (Pilgrim) on Jul 08, 2000 at 01:28 UTC
|
I want to write a review of the book, "Elements of programming with Perl", by Andrew Johnson. I found it to be very helpful first perl book (looked at the O'Reilly books and they weren't as good for learning). The book has excercises which is very helpful, although no example solutions, which would have been helpful the couple of times I got stuck.
--Ivory | [reply] |
RE: Reviews Quest
by BigJoe (Curate) on Jul 07, 2000 at 06:39 UTC
|
I would do a book review on the Perl Cookbook which is my favorite but I really don't want to let the book down with a badly written review
--BigJoe | [reply] |
|
I take it seeing that there is no movies section that my review of Hackers doesn't work...
--BigJoe
for people who don't know me that well this is a joke..
| [reply] |
RE: Reviews Quest
by CMonster (Scribe) on Jul 08, 2000 at 01:43 UTC
|
Hmmm.
I see three possible places to post reviews for the Quest,
and none of
them seem quite right. There's Reviews Quest, Reviews,
and Reviews Section. Which one is right?
A discussion on Posting a review has opened up as well,
with more disturbing news. Any ideas?
| [reply] |
(zdog) RE: Reviews Quest
by zdog (Priest) on Jul 08, 2000 at 09:44 UTC
|
Uh... vroom.
I think you meant to link to Reviews rather than the Reviews Section node in the quest post. I may be wrong though, so.... -- zdog (Zenon Zabinski)
Go Bells!! '¿' | [reply] |
Re: Reviews Quest
by deprecated (Priest) on Jan 20, 2001 at 22:47 UTC
|
| [reply] |