RE: How to use warnings in Apache::ASP?
-Original Message- From: Joshua Chamas [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 29, 2000 7:28 PM To: Philip Mak Cc: [EMAIL PROTECTED] Subject: Re: How to use warnings in Apache::ASP? Philip Mak wrote: Is there a way to make it so that all Apache::ASP scripts on my site have "use warnings;" on by default (something analogous to PerlSetVar Strict 1 and use strict;)? Or do I just have to put "use warnings;" in every file? What does it do? Never heard of it, same as -w? warnings is NOT a module (someone called it that in another post). Its a pragma (new, as of perl 5.6), like 'use strict', which means you can turn it on or off locally in any block. (Or turn parts of it on or off). HTH, Douglas Wilson
How to use warnings in Apache::ASP?
Is there a way to make it so that all Apache::ASP scripts on my site have "use warnings;" on by default (something analogous to PerlSetVar Strict 1 and use strict;)? Or do I just have to put "use warnings;" in every file? I searched the nodeworks.com/asp site (keyword warning/warnings) as well as the modperl mailing list archive (keyword "warning ASP" and "warnings ASP") but could not find anything. -Philip Mak ([EMAIL PROTECTED])
Re: How to use warnings in Apache::ASP?
Philip Mak wrote: Is there a way to make it so that all Apache::ASP scripts on my site have "use warnings;" on by default (something analogous to PerlSetVar Strict 1 and use strict;)? Or do I just have to put "use warnings;" in every file? I searched the nodeworks.com/asp site (keyword warning/warnings) as well as the modperl mailing list archive (keyword "warning ASP" and "warnings ASP") but could not find anything. What does it do? Never heard of it, same as -w? Does putting it into your global.asa do the trick? Its the same namespace as all of your scripts unless you use UniquePackages setting. I'm thinking about a Script_OnCompile or Script_OnParse event, maybe you could add it to all of your perl at that time? -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: How to use warnings in Apache::ASP?
Philip Mak wrote: I just tried doing the global.asa thing, but I realized another problem. Recently, I installed a new version of perl on my system (upgraded 5.00503 to 5.6). Something went wrong though; Apache::ASP is still using the old version of perl. If I run /usr/bin/perl, /usr/local/bin/perl, or a CGI script, the $] (version) variable evaluates to 5.6. But inside ASP scripts, the version is 5.00503 (use warnings doesn't work in 5.00503). This is because Apache::ASP uses that same perl that mod_perl does. Just recompile your mod_perl with your new perl, and the problem will go away! Would you happen to know how to find out the pathname of the perl executable that Apache::ASP is using? I found a file called /usr/bin/perl5.00503, but relinking that to perl 5.6 had no effect. I would imagine that looking at @INC would give you a hit as to which perl you are using since the perl lib directories tend to have build numbers locations that are related. Also, does ASP have a directive for turning on -w? No. Enjoy the upgrade! -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051