Hi all,

I know how to access a class from inside a subroutine, using "my $self =
shift;" then using that $self var, but how can I access the same class from
outside of any subroutine of a certain package?

I saw that I can put the following line in the package Package::Name,
outside of any subroutine:

my $class = Package::Name->new();

then I can use the var $class, but I don't know if it is the right way to
initialize the class from the same package.
And I don't like to use Package::Name directly because I might need to
change its name and then I would need to change that name in many places.

Thank you.

Teddy


-- 
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