in reply to Using package variables dynamically
But I'm confused as to what you're really trying to achieve here. My gut instinct is that whatever it is, it's probably better done another way.package my::model::subclass; . . . sub normal_hr { # because it returns a hashref \%normal } # then: package my::model; . . . sub use_subclass_package_var { my ($self, @cols) = @_; my $normal = $self->normal_hr; foreach my $col (@cols) { next unless exists $normal->{$col}; # the rest of the code } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using package variables dynamically
by redhotpenguin (Deacon) on Feb 08, 2005 at 18:53 UTC |