Thank you Shawn! The CGI::Carp seems works. And, I added such code: open(MYTMP, ">> /mytmp.log"); print MYTMP "test.....\n"; close(MYTMP); It seems works.
But, I am still confused the project's warn message. If I add a simple warn code in the same place, such as: warn "simple warn message\n"; I can not find this message in the project private logs. Also, I can not find this message in the Apache server logs. Where does this warn message go? The original author set some debug information level? Or any other redirect ?? Thanks a lot, Bruce. On Mon, Nov 2, 2009 at 11:30 AM, Shawn H Corey <shawnhco...@gmail.com>wrote: > Ming Qian wrote: > > Sorry. This is the complete email. > > > > Dear All, > > > > I am a beginner. > > Recently, I receive a project in perl. > > In some *.pm files, > > > > use Carp; > > ......................... > > > > sub A { > > ............. > > warn "a warn message"; > > .............. > > } > > > > I am sure that sub A was executed. > > But I can not find the warn message in log. > > The project is database website. perl + mason + html. > > > > Via the httpd.conf, I know the log location. > > So I think there maybe a switch or a debug level ? > > > > When writing a CGI, you should use CGI::Carp > > use CGI::Carp qw( fatalsToBrowser warningsToBrowser ); > > This will send all die() and warn() messages to the browser. > > > -- > Just my 0.00000002 million dollars worth, > Shawn > > Programming is as much about organization and communication > as it is about coding. > > I like Perl; it's the only language where you can bless your > thingy. > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > >