Ok, here's the scenarious.

Runnign Text::Template with a PACKAGE.  Let's just call it M.

So, for example, I have a script

$M::fill_me_in and Text::Template will fill that variable in.

Anyway, I know that those are global variables, so when I enable mod_perl, they retain 
the previous values.

Is there a quick easy way to reset all of those variables for each time the script is 
run?  I'm assuming no.  I did make a function that ran through the package, like so:

        my ($key,$value) ;

        foreach $key (sort keys %main::M::) {
                my $value = $main::M::{$key} ; 
                $main::M::{$key} = "" ; # reset to blank 
        }

and placing that at the bottom of the mod perl enabled script...but it doesn't work.

I tried "reset 'M'" and that also doesn't work.

Any thoughts on this?  The short term solution I have come up with is that in every 
sub/package/whatever I reset those variables to blank each time the subroutine that 
would fill those in is called.  Is that the best way to do it?  I would think the way 
I mentioned above would work, but maybe I just have to call that from each sub 
routinue.

Thanks,
Bill
[EMAIL PROTECTED]

Reply via email to