mp has asked for the wisdom of the Perl Monks concerning the following question:
Are there any pitfalls with this approach (e.g. memory leaks)? Is there any reason (other than to allow it to be set from outside the package) to changepackage Some::Package::Name; use strict; use warnings; my $class_data; sub some_class_method { my $class = shift; some_operation_to_define($class_data); } sub some_other_class_method { my $class = shift; return some_fuction_based_on($class_data); }
tomy $class_data;
?our $class_data;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: "our" versus "my" for class data
by revdiablo (Prior) on Aug 07, 2004 at 23:10 UTC | |
by dragonchild (Archbishop) on Aug 08, 2004 at 02:47 UTC | |
by revdiablo (Prior) on Aug 08, 2004 at 06:38 UTC | |
by tilly (Archbishop) on Aug 08, 2004 at 07:39 UTC | |
by revdiablo (Prior) on Aug 08, 2004 at 18:23 UTC | |
Re: "our" versus "my" for class data
by bgreenlee (Friar) on Aug 07, 2004 at 22:33 UTC | |
Re: "our" versus "my" for class data
by adrianh (Chancellor) on Aug 07, 2004 at 22:45 UTC | |
Re: "our" versus "my" for class data
by hv (Prior) on Aug 08, 2004 at 16:04 UTC |