Gentoo Archives: gentoo-user

From: Gregory SACRE <gregory.sacre@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Perl server-side debug
Date: Thu, 07 Aug 2008 08:29:45
Message-Id: 5e213dd40808070129w77f5ce9agbcda597ced9ebd85@mail.gmail.com
In Reply to: [gentoo-user] Perl server-side debug by felix@crowfix.com
1 Well, to be honest, I am developing a server side Perl application on
2 my Gentoo box. Everything is local and I just transfer the sources to
3 their Window$ server.
4 So far, the only debugging method I used for my Perl script is a "tail
5 -f /var/log/apache2/error_log". It was not verbose, but at least 90%
6 of the time, it was giving me where the problem occured, so it was not
7 that hard to figure out what happened.
8 But this method depends on the fact that you have access to the logs,
9 which might not be possible in your case.
10
11 What I tried to do also in my developing is to keep separate the web
12 specific parts from the logic ones. This helped me in a sense that
13 most of the "logic" scripts can be executed from the command line with
14 some parameters (as they are independent from where they are called)
15 and therefore be tested on the spot. The web specific part is
16 generally related to display and not that often keen on errors :-)
17
18
19 HTH,
20
21 Gregory
22
23 On Mon, Aug 4, 2008 at 7:51 PM, <felix@×××××××.com> wrote:
24 > I have a non-gentoo question here, but my problems are probably partly
25 > flavored by using gentoo at home and something else at work.
26 >
27 > Here is a page on debugging perl server-side code under Apache:
28 >
29 > http://perl.apache.org/docs/1.0/guide/debug.html#Interactive_mod_perl_Debugging
30 >
31 > It has two steps: starting apache with -X (run on the console in the
32 > foreground, don't fork or start any children, handle incoming requests
33 > directly one at a time) and adding configuration to use Apache::DB.
34 >
35 > My problem is that I am trying to do this on a server not entirely
36 > under my comlete control; it writes a configuration file from a
37 > template which I can change, but a lot of internal logic deals with
38 > Mason, and I can't just go changing everything to make this work. I
39 > can start my own server, that is not the problem, it's that I must
40 > keep its original behavior intact, including using Mason.
41 >
42 > One of the puzzles is that the web page in question apparently is
43 > using a pretty old version of perl5db.pl, 1.0402, which has different
44 > perldb commands than I am used to: 'w' for a "window" of source
45 > listing, where I am used to 'l' for "list". Both my home gentoo
46 > system and this foreign system I am using are 1.28.
47 >
48 > Or perhaps this web page is written for Windows users of some sort,
49 > and Windows perl has differences from the real version :-)
50 >
51 > Does anyone have any experience with this server-side debugging process?
52 >
53 > --
54 > ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
55 > Felix Finch: scarecrow repairman & rocket surgeon / felix@×××××××.com
56 > GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
57 > I've found a solution to Fermat's Last Theorem but I see I've run out of room o
58 >
59 >

Replies

Subject Author
Re: [gentoo-user] Perl server-side debug felix@×××××××.com