problem about mod-perl-Collection of common programming errors


  • user1059749
    xml perl xml-parsing mod-perl
    I would like to get images from XML file below.Part of how to get images url from XML file below but I can not receive it: my @imageurl; foreach my $img(@{$_->{images}}){ my $imgurl = &makeScalar($img->{image}->[0]); I think something is wrong here: my $imgurl = &makeScalar($img->{image}->[0]); because if do this:my @imageurl; foreach my $img(@{$_->{images}}){ my $imgurl = &makeScalar($img->{image_0}->[0]); I get only one image instead of

  • DVK
    perl apache unit-testing mod-perl embperl
    Is there a good API that would allow someone to create an object of Apache class?The class itself seems to lack a constructor; and synopsis wasn’t very helpful. My suspicion is that it’s somehow done via sublcass, e.g. Apache::Request?The context is I’m trying to write a test for a module which uses Embperl’s $HTML::Embperl::req_rec variable (more specifically, calls the uri() method on an object contained in it). The variable, upon examination, contains an object with ref($req_rec) eq ‘Apache’.

  • Ether
    perl apache architecture mod-perl
    I’ve written a website in Perl. It has a root handler, that all HTTP requests are sent to.This root handler then processes the request, and things like cookies, POST and GET vars, etc, then chooses a sub-handler and forwards the request on to that.Because the root handler includes all the sub handlers, and all the sub handlers include all the modules they require, I’m basically processing the entire code base on every request. If we weren’t using mod_perl I’d be a bit concerned about this.But is

  • rubber boots
    apache2 windows mod-perl
    mod_perl2 on Windows?It’s sometimes beneficial (at least for me) to have a recent Apache http server plus mod_perl2 (and PHP) running on the development (desktop) box to try out some ideas.This was straightforward until Perl version 5.10 where you could simply install the win32 binary from apache.org, install Activeperl 5.10, then install mod_perl2 via the Activestate-ppm installer and be done with it. Both Perl and the httpd binary were VC6 (Visual C++ 6) builds, mod_perl2 would get runtime-

  • voretaq7

  • Sarien
    php perl apache mod-perl mod-php
    E.g. Is it more secure to use mod_php instead of php-cgi? Or is it more secure to use mod_perl instead of traditional cgi-scripts?I’m mainly interested in security concerns but speed might be an issue if there are significant differences.

  • Joel Berger
    perl mod-perl mojolicious openbsd
    The following script should demonstrate a problem I’m facing using Mojolicious on OpenBSD5.2 using mod_perl.The script works fine 4 times being called as CGI under mod_perl. Additional runs of the script result in Mojolicious not returning the asynchronous posts. The subs that are usually called when data is arriving just don’t seem to be called anymore. Running the script from command line works fine since perl is then completely started from scratch and everything is reinitialized, which is no

  • ufk
    apache2 perl mod-perl
    Hiya. I’, using Gentoo linux. it seems that i cannot emerge/install mod_perl with a threaded apache2 so i would like to know what’s the pros and cons of using the worker module of apache2 with cgi-perl and using the prefork module of apache2 with mod_perlwhat’s faster? what takes less resources? security wise, is there any difference?thanks!

  • Brendan
    apache2 mod-perl
    Im trying to debug why an app server of ours all of its apache children lockup and stop serving requests. These are mod_perl app servers.The problem is that to find out what the current requests are you need to make a http request to find out the server-status (using mod_status).

  • rakhavan
    perl error-handling mod-perl
    Thanks to everyone in advance.I’ve been doing some research on error handling and I don’t feel like I’m getting a solid understanding of what I should do.Preamble: My code is living in Apache and executed in the browser, my goals don’t include command line execution.I’d like to have the behavior of CGI::Carp (fatalsToBrowser) with the ability to capture the output and be able to throw it in my own templated page, email it etc… I did notice that fatalsToBrowser doesn’t work with mod_perl. Does

  • pilcrow
    perl scope mod-perl mod-perl2
    I’ve been using apache mod_cgi during some years. Now I am moving to mod_perl and I have found some problems, specially with subroutines. Until now I was never using my, our nor local; and the CGI scripts worked without problems. After reading documentation and even some previous questions posted here I understand more or less how my, our and local works. My concern is what information is going to be shared between the next requests (if I understand correctly, that’s the main concern I must have

  • Pit
    regex perl mod-perl
    I get a uninitialized value in string eq at *** line xxx warning in my code, which would be easy too fix if there actually was aneq at that line.But there is a regular expression match on a value inside a hashref.if ($hashref->{parameters}->{type} =~ m/:/) {some lines before this I even have this:$hashref->{parameters} = defined($hashref->{parameters}) ? $hashref->{parameters} : ”; $hashref->{parameters}->{type} = defined($hashref->{parameters}->{type}) ? $hashref->

  • Craig Treptow
    perl perl-module mod-perl
    The below code gives some strange output. Can any one explain the problem?use warnings; my $P = 10; print “My Var: $P\n”; display();my $P = 12; display();sub display() {print “My Var: $P\n”; }output:My Var: 10 My Var: My Var: 12

  • Jane Wilkie
    apache catalyst mod-perl
    I have a suse box that holds three Catalyst apps. Ultimately I need to run all three (which in itself is not a problem, each has a different port) through Apache with mod_perl and SSL. I have successfully gotten to the point of firing up one Catalyst app and then having a successful transition to the Catalyst server. In case anyone needs a GREAT step by step on how to do this, you can see it here. http://www.catalystframework.org/calendar/2005/7I’m not an Apache expert, but the problem is that I

Web site is in building