Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

(MeowChow) Re3: DBIx::PearDSN

by MeowChow (Vicar)
on Apr 08, 2002 at 19:58 UTC ( #157533=note: print w/ replies, xml ) Need Help??

in reply to Re: (MeowChow) Re: DBIx::PearDSN
in thread DBIx::PearDSN

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:
{ my %map = (...); sub dbs_dsn { ... } }
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?
               s aamecha.s a..a\u$&owag.print

Comment on (MeowChow) Re3: DBIx::PearDSN
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://157533]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (1)
As of 2015-10-10 10:54 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (255 votes), past polls