@param is a special variable and you use it in an unsupported way (see my other 
mail).

Any other global should be cleaned up at the end of the request

Gerald


> -----Original Message-----
> From: Michael Stevens [mailto:michael.stev...@dianomi.com]
> Sent: Wednesday, July 21, 2010 12:46 PM
> To: Ed Grimm
> Cc: cabell.demarcel...@dianomi.com; embperl@perl.apache.org; Michael
> Smith
> Subject: Re: @param seems to be shared between Execute calls
> 
> My actual problem is occuring under Apache, and what I'm expecting is
> for things to be cleaned up between requests, which isn't happening.
> 
> But even this small test case is not the way I'd expect things to
> behave.
> 
> On 20/07/10 22:20, Ed Grimm wrote:
> > Note that, under Apache, the cleanup code happens at the end of each
> > request - each of which could have dozens of Execute calls, between
> > which it is very definitely NOT called.
> >
> > I have not used Embperl much from within server scripts, but in my
> > limited use there, I've never seen the cleanup code fire. I suspect
> each
> > script is considered 'a request' for the purposes of the cleanup code
> > (well, as far as docs are concerned. I don't know if the code
> actually
> > fires on END.)
> >
> > --
> > Ed Grimm
> > Identity Services
> >
> >
> > From:       Michael Stevens <michael.stev...@dianomi.com>
> > To:         embperl@perl.apache.org
> > Cc:         Michael Smith <michael.sm...@dianomi.com>,
> > cabell.demarcel...@dianomi.com
> > Date:       07/20/2010 10:12 AM
> > Subject:    @param seems to be shared between Execute calls
> >
> >
> > ---------------------------------------------------------------------
> ---
> >
> >
> >
> > Hi.
> >
> > We're seeing an odd bug where @param seems to be shared between
> Execute
> > calls in the same process. The following code is a test case for
> this:
> >
> > #!/usr/bin/perl -w
> >
> > use strict;
> > use Embperl;
> >
> > my $output1;
> >
> > my $input = '[- $param[0]->{hello} = 42; -]';
> >
> > Embperl::Execute({
> > inputfile => "blah",
> > input => \$input,
> > output => \$output1,
> > });
> >
> > my $output2;
> > my $input2 = '[- use Data::Dumper; print Dumper(\...@param); -]';
> >
> > Embperl::Execute({
> > inputfile => "blah",
> > input => \$input2,
> > output => \$output2
> > });
> >
> > Which on my machine outputs:
> >
> > $VAR1 = [
> > {
> > 'hello' => 42
> > }
> > ];
> >
> > Surely this shouldn't happen?
> >
> > --
> > Michael Stevens
> > Dianomi Ltd
> > 18 Buckingham Gate
> > London SW1E 6LB
> >
> > Tel: 020 7802 5530
> > Fax: 020 7630 7356
> > www.dianomi.com
> >
> > The information in this message and any attachment is intended for
> the
> > addressee and is confidential and may be subject to legal privilege.
> > Dianomi Ltd, Registered Office: One America Square, Crosswall,
> London.
> > EC3N 2SG. Registered in England and Wales with Company Registration
> > Number 4513809. VAT registration number: 809754988
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscr...@perl.apache.org
> > For additional commands, e-mail: embperl-h...@perl.apache.org
> >
> >
> 
> 
> --
> Michael Stevens
> Dianomi Ltd
> 18 Buckingham Gate
> London SW1E 6LB
> 
> Tel: 020 7802 5530
> Fax: 020 7630 7356
> www.dianomi.com
> 
> The information in this message and any attachment is intended for the
> addressee and is confidential and may be subject to legal privilege.
> Dianomi Ltd, Registered Office: One America Square, Crosswall, London.
> EC3N 2SG. Registered in England and Wales with Company Registration
> Number 4513809. VAT registration number: 809754988
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscr...@perl.apache.org
> For additional commands, e-mail: embperl-h...@perl.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscr...@perl.apache.org
For additional commands, e-mail: embperl-h...@perl.apache.org

Reply via email to