in reply to Re(4): Database design and Class::DBI
in thread Database design and Class::DBI

Hmmm, I don't see how what you're doing is really any different from using constant. Isn't constant doing exactly the same thing behind the scenes? I also don't think it's fair to complain that you couldn't override a sub made by the constant pragma, since you're not supposed to know that it's a sub anyway!

However, I am very down on the use of the constant pragma and using subs as constants in general, because of all the messy situations you get into when trying to use your constants in a string or a hash key. I think it's much more clear to just use globals, which everyone can understand immediately.

  • Comment on Re: Re(4): Database design and Class::DBI