Thanks for your reply Dave
I use strict, warnings on, the objects are created within a sub using 'my'. I stripped down the script to see what was going on but to no avail.
#!/usr/bin/perl -w
use CGI;
use Session;
use Community;
use CGI::Carp;
main();
sub main {
my $query = new CGI;
my $uri = 'www.moonfruit.com';
setup($uri, $query);
}
sub setup {
my ($uri, $query) = @_;
my $dbh = db_connect();
my $session= new Session($dbh, $query, "guest", $uri);
my $community = new Community($session);
print $query->header();
return;
}
So the objects should go out of scope once the sub has finished. However as I mentioned they don't automatically get 'destroyed'. I know this as the DESTROY method of the objects are not called, they are however called when I stop the server.
|