On Thu, Jun 28, 2001 at 03:05:17PM -0400, Richard J. Barbalace wrote:
> The 'use base' pragma nicely takes care of the @ISA and %FIELDS
> variables for me, but I also need to have the package global variable
> %Attributes inherited.  The 'use vars' and assignment in MyPackage is
> rather verbose, and I'm wondering if there is a better or terser way
> of doing that.  What's the recommended way of inheriting package
> global variables?

Exporting is usually a bad idea when dealing with classes, it breaks
encapsulation.  You should probably setup a class method for this.

That being said, you can export variables just like you export any other
data type, with Exporter; perldoc Exporter or
http://www.perldoc.com/perl5.6/lib/Exporter.html.


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

Reply via email to