Re: due core cpu

2006-02-22 Thread Holger Kipp
On Wed, Feb 22, 2006 at 04:02:28PM +0800, Ken Perl wrote: Will a modperl2 program run faster on a cue core cpu machine than a single cpu machine if we assume their speeds are same? In other words, should I buy a new due core cpu machine? This is not an easy question. A program without

Re: Can't print to selected filehandle?

2006-02-22 Thread Konstantin Khomoutov
Scott Gifford wrote: First off I would convert it to using IO::File or somehow get rid of using globs. Such as my $fh = select; But this won't solve your error, just makes the code easier to work with. I actually tried that, but couldn't get it to work: #!/usr/bin/perl -Tw use

compilation error for ModPerl::RegistryLoader???

2006-02-22 Thread David Dick
I'm sure i'm doing something wrong, but when i perl -MModPerl::RegistryLoader -e 'print 1;' i get the following error; Bareword Apache2::ServerUtil::server_root not allowed while strict subs in use at /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/ModPerl/RegistryLoader.pm line 74.

[ANNOUNCE] Apache-Test 1.28

2006-02-22 Thread Geoffrey Young
The URL http://people.apache.org/~geoff/Apache-Test-1.28.tar.gz has entered CPAN as file: $CPAN/authors/id/G/GE/GEOFF/Apache-Test-1.28.tar.gz size: 149856 bytes md5: 76ca771bb9d36b6215e7f418a7fd5e9a --Geoff Changes since 1.27: add need_imagemap() and have_imagemap() to check for

Syntax issue in Apache/TestConfig.pm TestUtil.pm

2006-02-22 Thread William A. Rowe, Jr.
Both lib/Apache/TestConfig.pm and lib/Apache/TestUtil.pm twist off their own shebang lines from $Config{perlpath}, which is wrong. They should simply pull $Config{startperl} which defines the shebang/command on a platform basis. See startperl= assignment from Config.pm. Please ack / discuss /

find all uninitialized variables?

2006-02-22 Thread Harry Zhu
Is there an easy way (a tool)tolocate all uninitialized variablesfor modperl modules in a dirctoryso I can initilized them and get rid of the annoying warnings? Googlling on the internet seems no useful results. Some one shield me a light? Harry Zhu

RE: find all uninitialized variables?

2006-02-22 Thread Frank Maas
Is there an easy way (a tool) to locate all uninitialized variables for modperl modules in a dirctory so I can initilized them and get rid of the annoying warnings? Googlling on the internet seems no useful results. Some one shield me a light? Does not seem to be a specifiec mod_perl thing,

Re: find all uninitialized variables?

2006-02-22 Thread Harry Zhu
use strict will find the undeclared/undefined variables. something like my $var; and later on used in the program will not be find by the use strict, but will cause use uninitialized variables warnings if -w switch is on. Harry - Original Message - From: Frank Maas [EMAIL

Re: find all uninitialized variables?

2006-02-22 Thread Tyler MacDonald
Harry Zhu [EMAIL PROTECTED] wrote: use strict will find the undeclared/undefined variables. something like my $var; and later on used in the program will not be find by the use strict, but will cause use uninitialized variables warnings if -w switch is on. If you really want to

Re: find all uninitialized variables?

2006-02-22 Thread Harry Zhu
Say I have a file directory with hundreds of modules, I want to know if there is a tool I can scan and identify the uninitalized variables in all the files once (or through a loop) without actually running through all the pages. Harry - Original Message - From: Tyler MacDonald

Does a Perl section know where it is?

2006-02-22 Thread Tyler MacDonald
I've been poking around in the documentation but I can't seem to find this... Is there any way for a Perl section in a httpd.conf file to know what file it's been evaluated out of? Ideally I'd like to be able to do something similar to this for packaging mod_perl handlers and apache

Re: find all uninitialized variables?

2006-02-22 Thread Ryan Gies
I've been frustrated with the Use of uninitialized value warning myself, and was hoping someone could shed some light on it as well. Point being, this will issue the warning: #!/usr/bin/perl -Tw sub max { return $_[0] $_[1] ? $_[0] : $_[1]; } max(); In what seems like logic, the

Re: find all uninitialized variables?

2006-02-22 Thread Frank Wiles
On Wed, 22 Feb 2006 17:37:05 -0600 Harry Zhu [EMAIL PROTECTED] wrote: Say I have a file directory with hundreds of modules, I want to know if there is a tool I can scan and identify the uninitalized variables in all the files once (or through a loop) without actually running through all the

Re: find all uninitialized variables?

2006-02-22 Thread Jonathan Vanasco
if you use strict ; use warnings; any module that you load w/an uninitialized variable will print an error what i do is as follows: use warnings strict in $APP_DIR/etc/startup.pl include all my modules in $APP_DIR/etc/startup.pl tail -f

Re: find all uninitialized variables?

2006-02-22 Thread Tyler MacDonald
Harry Zhu [EMAIL PROTECTED] wrote: Say I have a file directory with hundreds of modules, I want to know if there is a tool I can scan and identify the uninitalized variables in all the files once (or through a loop) without actually running through all the pages. If you don't want

Re: find all uninitialized variables?

2006-02-22 Thread harry
Looks like a cool QA tool, I'll check it out. Thanks. Harry - Original Message - From: Tyler MacDonald [EMAIL PROTECTED] To: Harry Zhu [EMAIL PROTECTED] Cc: modperl@perl.apache.org Sent: Wednesday, February 22, 2006 3:50 PM Subject: Re: find all uninitialized variables? Harry Zhu

Re: find all uninitialized variables?

2006-02-22 Thread harry
Looks like what I needed (if works) but with a lot of editting: use Module1, use Module2, ..., use ModuleN. Thanks. Harry - Original Message - From: Jonathan Vanasco [EMAIL PROTECTED] To: Harry Zhu [EMAIL PROTECTED] Cc: mod_perl List modperl@perl.apache.org Sent: Wednesday,

Re: find all uninitialized variables?

2006-02-22 Thread Jonathan Vanasco
a_ you should preload modules into mod_perl already to take advantage of shared memory b_ you can automate listing the files using File::Find and some sprintf magic my @perl_files ; use File::Find; find(\wanted, ( /paths/to/modules ) ); sub wanted

Re: Does a Perl section know where it is?

2006-02-22 Thread Jonathan Vanasco
is this what you want? $apr-location() On Feb 22, 2006, at 6:43 PM, Tyler MacDonald wrote: I've been poking around in the documentation but I can't seem to find this... Is there any way for a Perl section in a httpd.conf file to know what file it's been evaluated out of?

Re: Syntax issue in Apache/TestConfig.pm TestUtil.pm

2006-02-22 Thread Geoffrey Young
William A. Rowe, Jr. wrote: Both lib/Apache/TestConfig.pm and lib/Apache/TestUtil.pm twist off their own shebang lines from $Config{perlpath}, which is wrong. I think part of this stems from this http://www.gossamer-threads.com/lists/modperl/dev/86017 They should simply pull

Re: Does a Perl section know where it is?

2006-02-22 Thread Jonathan Vanasco
Correction: $apr-location no () its not a method. sorry about that. On Feb 22, 2006, at 7:19 PM, Jonathan Vanasco wrote: is this what you want? $apr-location()

Re: Does a Perl section know where it is?

2006-02-22 Thread Tyler MacDonald
Jonathan Vanasco [EMAIL PROTECTED] wrote: is this what you want? $apr-location() What class is that method a part of? I didn't see anything about location in PerlSections... Apache2::Directive seems to have what I'm after (filename and line_num methods), if I cold only

Re: Does a Perl section know where it is?

2006-02-22 Thread Jonathan Vanasco
its part of Apache Request it should be the location container i misinterpreted yoru question though. sorry about that .. its not what you needed. i thought you meant what directory mapping its being evaluated from. you're looking for the mod_perl equivalent of the php scriptname or

Re: find all uninitialized variables?

2006-02-22 Thread Harry Zhu
Thanks. But I did a simple svn list -R and get what I want into a file and some quick substitution editting. Now I have a test.pl file to load it in Apach conf. Harry - Original Message - From: Jonathan Vanasco [EMAIL PROTECTED] To: Harry Zhu [EMAIL PROTECTED] Cc: mod_perl List

Re: Does a Perl section know where it is?

2006-02-22 Thread Tyler MacDonald
You know what? The mod_perl people are freaking geniuses. This works: Perl warn __FILE__, - , __LINE__, \n; /Perl crackerjack:/home/faraway/dev# apache2ctl stop /home/faraway/dev/test.conf - 5 That is so slick! - Tyler Jonathan Vanasco [EMAIL PROTECTED] wrote: its

Re: Syntax issue in Apache/TestConfig.pm TestUtil.pm

2006-02-22 Thread William A. Rowe, Jr.
Geoffrey Young wrote: ack and discuss :) let's hold off on making any changes until we are really sure we won't be breaking old platforms. speaking of breakage, which platform is giving your grief with this? randy reported success with win32 so it's something else? Something else. My

Re: find all uninitialized variables?

2006-02-22 Thread Ronald J Kimball
On Wed, Feb 22, 2006 at 03:47:45PM -0800, Ryan Gies wrote: I've been frustrated with the Use of uninitialized value warning myself, and was hoping someone could shed some light on it as well. Point being, this will issue the warning: #!/usr/bin/perl -Tw sub max { return $_[0]

Re: Syntax issue in Apache/TestConfig.pm TestUtil.pm

2006-02-22 Thread Stas Bekman
Geoffrey Young wrote: William A. Rowe, Jr. wrote: Both lib/Apache/TestConfig.pm and lib/Apache/TestUtil.pm twist off their own shebang lines from $Config{perlpath}, which is wrong. I think part of this stems from this http://www.gossamer-threads.com/lists/modperl/dev/86017 Mike's

Re: Syntax issue in Apache/TestConfig.pm TestUtil.pm

2006-02-22 Thread William A. Rowe, Jr.
I don't think the reporter understood the concept of #!/usr/bin/perl eval 'exec $Config{perlpath} -S \$0 \${1+\$@}' if \$running_under_some_shell; which is a noop under perl, and invokes a shell exec command under shell. Perl never invokes the exec ($running_under_some_shell is undef and