If your TestSuite is a singleton (as it sounds like), you can make a package variable ($TestSuite::ts) that contains the one TestSuite that's been instantiated, and then everybody can have at it as they like.
If you plan to have more than one TestSuite, have it hand itself to its sub-objects at their creation.
$ts->make_a_blob(); $ts->{blob}->{your_lord_and_master} = $ts; weaken $ts->{blob}->{your_lord_and_master};
Note the importance of using weaken from Scalar::Util to create a weak reference. Without that, the circular references we just created will keep the objects from being destroyed properly when it's time to collect garbage.
Then Blob::print_stuff() can look at $self->{your_lord_and_master}->{info} and more.
In reply to Re: Proper way to create 'globals'
by kyle
in thread Proper way to create 'globals'
by zaven
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |