in reply to Re: mod-perl and globals
in thread mod-perl and globals

Thanks for the reply. All of you. I agree with your suggestions. Here is the catch. I'm using an old bunch of code, about 800-900 lines, that need to be updated to work in mod-perl. It uses globals extensively and in really careless ways. This code uses a common cgi parsing routine that parses the url agrs and dumps them into globals. I want to avoid a total rewrite.

I'm beginning to understand how mod-perl is handling things. It's different than I thought.

Replies are listed 'Best First'.
RE: RE: Re: mod-perl and globals
by Aighearach (Initiate) on Jun 27, 2000 at 03:59 UTC

    Have you seen the mod_perl guide section on porting? I have found that if I am faced with 1000 lines of messy code, I can usually rewrite it from scratch in half that, with less effort than it would be to maintain the spaghetti. As St. Larry said:
    "If the burden of decision making is on the programmer, then it's possible for the programmer to make a mess of things. It's possible for Perl programmers to write messy programs. (In case you hadn't noticed.) It's also possible for Perl programmers to write extremely clean, concise, and beautiful programs."
    -- Larry Wall

    If it's ugly, replace it with something beautiful.

    Paris Sinclair    |    4a75737420416e6f74686572
    pariss@efn.org    |    205065726c204861636b6572
    I wear my Geek Code on my finger.