I always try to scope such mapping hashes to the subs that need them. Only dsi_dsn needs the %map, so why make it available to other subs? There's also no point in having it global.This is exactly why I suggested the alternative of creating a new enclosing scope, as in:
Even for a sub that isn't called very often, why do the work every time and throw it away, when you can do it just once?{ my %map = (...); sub dbs_dsn { ... } }
MeowChow s aamecha.s a..a\u$&owag.print
In reply to (MeowChow) Re3: DBIx::PearDSN
by MeowChow
in thread DBIx::PearDSN
by Juerd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |