>>>>> "Gary" == Gary Stainburn <[EMAIL PROTECTED]> writes:

Gary> I create a new track block such:

Gary> my $T1=Trainset->track('T1','Block');

Gary> This also created $Trainset::_BLOCKS{T1} which references the object.

Gary> My problem is how can I destroy the object when I no longer want it?

Yes, you need to weaken the reference in the package hash.  That's
nearly exactly the scenario I covered in
<http://www.stonehenge.com/merlyn/PerlJournal/col04.html> and in my
book "Learning Perl References Objects and Modules".

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to