> my startup script has the line
> use Html::App;
>  
> my main script calls this
> use strict;
> use Html::App;
> use DBI;
>  
> my ($cnt,$stts)=();
> $main::html=();
> $main::html=Html::App->new;

two "style" mistakes (harmless in this case):

* $main::html is a scalar, you shouldn't assign list to it!
should be $main::html = '';

* why doing the inialization twice?
$main::html=();
$main::html=Html::App->new;

the last statement is enough.

> Html::App contains
> package Html::App;
> sub new {
>     my $class = shift;
>     my $self = {};
>     print STDERR "$class, $self\n";
>     bless($self, $class);
>     return $self;
>     }
>  
> In the error log I get a print of the class and hash id
> The problem is that the hash id is the same after continuous runs. Therefore
> repeat refreshes results in unusual behaviour.  I think there must be some
> closure some where but can't spot it. 
> Does any one out there know the reason??

run the server in a single mode (httpd -X) and test. Also I hope you test
with warnings On, am I right? Note that it's possible that in -X mode, you
will get the same HASH(0x...) because the variable gets destroyed and than
nothing stops it to use the same memory block! I wouldn't rely on the test
you do. Instead I would put in different from invocation to
invocation stuff and print it out. Also you can work with debugger of
course! (see perl.apache.org/guide/debug.html)

>  
>  
> Thanks in advance 
> John
> 
> ********************************************************************
> This e-mail is intended only for the addressee named above.
> As this e-mail may contain confidential or privileged information,
> if you are not the named addressee, you are not authorised to
> retain, read, copy or disseminate this message or any part of it.
> ********************************************************************
> 
> 



_______________________________________________________________________
Stas Bekman    mailto:[EMAIL PROTECTED]      http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC     http://www.stason.org/stas/TULARC
perl.apache.org    modperl.sourcegarden.org   perlmonth.com    perl.org
single o-> + single o-+ = singlesheaven    http://www.singlesheaven.com

Reply via email to