I was going in and ripping out all the extra code so that I could post 
it and it started working.  I did some more screwing around and figured 
out what was causing the problem.  Its darned wierd though...

Here is the synopsis (fake code)

Three parts:
#1 - pl to execute the object
#2 - sessionmanager object
#3 - session object

The main program starts up a sessionmanager object
The main program then tells the sessionmanager to create a session via 
$sessionmanager->StartSession();

Inside the sessionmanager in the StartSession routine:
* It makes all call to new Session which creates itself and returns 
(works okay)

Then I changed it so that StartSession calls a subroutine called 
MakeNewSession
* So StartSession calls MakeNewSession (inside the same sessionmanager) 
exactly the same way
* Program goes screwy and tries to start a new SessionManager instead of 
a new Session

The problem:

I had created an accessor method in the sessionmanager called Session.  
It was intended to make it possible to call the sessionmanager and 
access a specific session within it.  The sub Session was located in the 
code physically between the StartSession and MakeNewSession.

If I comment it out, the code works fine
If I leave it in, but move it under the MakeNewSession it also runs 
fine.

Strange no?



-----Original Message-----
From: jesse [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 1:32 PM
To: cgiapp
Subject: RE: [cgiapp] OT: Need help with an object problem - Exhausted
all other alternatives so I am trying here as a last ditch effort


Hi Bill --

> Here is the code - the session.pm and sessionmanager.pm  and 
> testsession.pl (Tests the session object) go into a sub dir called 
> library:
> 
> Run testsessionmanager.pl to see the problem
> 
> In Sessionmanager.pm on line 75 it works fine
> When I try the same thing from line 161 it does not work

Your code didn't make it to the list.  You should post the salient bits 
in a
message body so we can take a look at it.


> But any calls to functions of that object such as: 
> my $id = $session->SessionID(); 
> Give me an error that says: Can't locate object method "SessionID" via 

> package "main" at library/sessionmanager.pm line 155. 

If I had to guess from this I'd say you are missing, or have a typo in, 
a
"package" or "use" statement, or a file is misnamed.

-Jesse-

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to