"Morse, Richard E.,MGH" <remo...@mgh.harvard.edu> writes: > > I've tried various things, but from what I can understand, even with > everything declared "our", the sub definition closes over the package > that it's in when defined. I've seen references to doing an `eval > ("package $package; sub handle_ages { ; }")`, but this makes > maintaining everything much harder, as I now don't have a base module, > but rather a bunch of text strings.
What about having a method that returns a reference to your map that you override in each of the derived classes? e.g. ... package PKG::_base; sub _map { die; } sub handle_ages { ; } sub handle_dests { ...; somethin_somethin($self->_map()->{YYZ}) } package PKG::fr; use base 'PKG::_base'; our %map; sub _map { \%map } sub handle_ages { ; } -- Mike Small sma...@panix.com _______________________________________________ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm