Re: Apache::ASP : perl variables tend to stick ...
"Demetrios C. Christopher" wrote: By the way, have you ever considered adding a pre-parsing step where you first read in all the subroutines separately (say, up to the first line of code) and place them before the actual subroutine that will become main and will denote the script itself? That could be a life-saver! I believe that's how the ATG-Dynamo people did it... Dynamo is a Java (no booing please) -based app server where the scripts (identical to jsp's) are precompiled as their own "classes" and then executed. In their case I believe they do that preparsing I mentioned except that in Java I don't think it makes much of a difference! Oh well, Perl : 4654574, Java : 1 ! I don't think I would be able to successfully parse out subroutines without writing a complicated parser, but its an interesting idea. I could have the UseStrict setting trigger an error_log warning recommending to move subs to a perl library possibly if I find a \nsub\s+\w+\s*{\s*\n kind of expression in the ASP perl code. I hate to digress again but although I understand the "closure" deal, why does it persist? In one execution I understand having that problem of not refreshing the value but why in subsequent executions as well? Shouldn't those values disappear by that point? I had it where I was adding elements to an array in the $arr[$#arr] fashion and if I pressed the refresh button fast enough the array would grow in size by the size of the original array! I'm pretty sure what server thread you're on makes a difference. So if you have three threads with the underlined being the active one here's what would happen to the array size if I added ten elements to $arr by saying $arr[$#arr] = x The problem/benefit of mod_perl is that things persist so variables don't get cleared, and my closures don't get recompiled. Your array growing problem sounds like one that "use strict" programming will take care of because if you initialize your array with my @arr; then it should be cleared just fine every script execution. --Joshua
Why it is so complicated ?
I am trying to install apache support for ASP (using win95). I have spent many days in downloading+reading+trying etc... without results. It seems as if it is the purpose of some persons to make it complicated. Is it a hard task to make one file (exe) to make it automatic installing ? Assil
dir_config and Apache::Table confusion
If I do this: $r-print($r-dir_config('key')); Then key is printed. If I then do this: my $tab = $r-dir_config; $r-print(Dumper($tab)); # Using Data::Dumper I get '$VAR1 = bless( {}, 'Apache::Table' )'; It's empty, how come? (bo)
Re: dir_config and Apache::Table confusion
On 21 Sep 2000, Bjørn Ola Smievoll wrote: If I do this: $r-print($r-dir_config('key')); Then key is printed. If I then do this: my $tab = $r-dir_config; $r-print(Dumper($tab)); # Using Data::Dumper I get '$VAR1 = bless( {}, 'Apache::Table' )'; It's empty, how come? Probably because keys doesn't return the keys of an Apache::Table object, since it is implemented in C. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
Re: dir_config and Apache::Table confusion
* Matt Sergeant | | Probably because keys doesn't return the keys of an Apache::Table object, | since it is implemented in C. I'm not quite sure it's that simple. If you replace dir_config() with headers_in() which also return an Apache::Table object you get a sane result from Dumper(). Also, when using dir_config as in my first posting $tab-{$key} returns nothing (undef?), but (as I said) dir_config($key) returns correctly. (bo)
Uploading File
New to mod_perl and am having problems writing a script to allow our creative department the ability to upload banners to a directory on our server. I'm using Apache::Request, but keep getting stuck and am ready to pull my hair outanother problem i have to deal with is that the banners have to go into different directories within the banner directory depending on what size they are. Can anyone give me any hints or tips? Or if anyone has a chunk of code I could possibly use I would really appreciate it. I'm ready to give up! __ Do You Yahoo!? Send instant messages get email alerts with Yahoo! Messenger. http://im.yahoo.com/
Re: Why it is so complicated ?
On Wed, 20 Sep 2000, - wrote: I am trying to install apache support for ASP (using win95). I have spent many days in downloading+reading+trying etc... without results. It can be frustrating ... It seems as if it is the purpose of some persons to make it complicated. To build packages that work seamlessly on many different platforms isn't easy, especially for Win32, but many people here have put a lot of effort into this - they make their lives harder so yours can be easier ... Is it a hard task to make one file (exe) to make it automatic installing ? Using the CPAN.pm module to install things is very good advice - Apache-ASP should build and install cleanly with it. Alternatively, if you're using ActivePerl (the 600 series, based on Perl-5.6.0), there's a mod_perl package you can try - install it as (on one line) ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/mod_perl.ppd and then ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/Apache-ASP.ppd You might need some additional packages for ASP, depending on your setup - these can also be installed by the ppm utility from ActiveState's site (see http://www.activestate.com/ppmpackages/ for a list of available packages). best regards, randy kobes
Re: OT: Server-push client page reload
Hi type: multipart/x-mixed-replace use CGI::Push qw(:standard) do_push(-next_page=\draw_a_page) sub draw_a_page { my ($q,$counter)= @_; return undef if $counter 100; my $time = localtime(); return start)html(), h1('test'), 'This page is caaled $counter times', hr, $time, end_html; } This is what I used once just as a test , but not under mod_perl. Netscape does support it. I understand that you have to set up channels under MS.. Not any idea about that. Could somebody point me some direction regarding channels. Arnold On Wed, 20 Sep 2000, Michael Nachbaur wrote: This is off-topic, but I need an answer pretty quick, and I *am* writing this app using mod_perl, so its sorta related (also, I don't want the headache of re-subscribing to a new list). You know those online web-based tech support chat systems? Its commonly frame based, but its just like IRC, but over HTML. when a user posts a message it immediatly pops up on the chat frame, and you submit your message through a regular-ol' HTML form. I don't think this is an applet, because this works in all sorts of browsers. I think its javascript, but I'm not sure. My main question, is when the server knows that a new message has been posted, how does it push that new page out to the client web browser? I'm used to all page-views originating from the client...not the server. Any ideas? --man Michael A. Nachbaur (KE6WIA) mike(at)nachbaur(dot)com http://www.nachbaur.com "..I've got blisters on my fingers!!!" -- Ringo Starr
Re: Uploading File
Lola Petzold ([EMAIL PROTECTED]) said something to this effect: New to mod_perl and am having problems writing a script to allow our creative department the ability to upload banners to a directory on our server. I'm using Apache::Request, but keep getting stuck and am ready to pull my hair outanother problem i have to deal with is that the banners have to go into different directories within the banner directory depending on what size they are. Can anyone give me any hints or tips? Or if anyone has a chunk of code I could possibly use I would really appreciate it. I'm ready to give up! perldoc Apache::Request and read about the Apache::Upload object. i think that will solve your problems. ky
Finding Consultants on adding Perl Modules
Hi: Do you have a list of consultants who have experience in adding Perl Modules to Apache? We have a business need for some modules, such as Storable, and would be willing to contract for them. Is there some mechanism in general for finding Apache consultants? There are other areas we could use some help in, but as you know, many people put Apache on their resume if they have even read your web site! I'd appreciate any help you could give on this. Byron Byron Stephen Lee Server Development Manager Telleo 4 North Second Street Suite 300 San Jose, CA 95113 phone (408) 792-5742 fax (408) 792-5795 email: [EMAIL PROTECTED]
Re: Finding Consultants on adding Perl Modules
On Thu, Sep 21, 2000 at 10:19:55AM -0700, Byron Stephen Lee wrote: Hi: Do you have a list of consultants who have experience in adding Perl Modules to Apache? We have a business need for some modules, such as Storable, and would be willing to contract for them. Is there some mechanism in general for finding Apache consultants? There are other areas we could use some help in, but as you know, many people put Apache on their resume if they have even read your web site! I'd appreciate any help you could give on this. perhaps you could try posting your requirements on sourcexchange? -- Paul Lindner [EMAIL PROTECTED] Red Hat Inc.