On Wed, 26 Mar 2003, Jeremy Zawodny wrote: > Someone recently submitted a patch for DBIx::DWIW that changed many > warn()s to carp()s, simply saying "most of the warns would be better > as carps." > > I've never been much of a Carp fan myself and I'm really not sure why. > > What do other module authors tend to do? Without a more compelling > reason to change, I'm hesitant to do so.
In practice I find that carp only makes sense where you need to give developers warnings about incorrect usage/arguments, etc., but warn is better used for those portions of your own code that's not working directly on externally passed arguments. In other words, use carp to point to potential problem code calling your module, but use warn to point to potential problem code inside the module. --Arthur Corliss Bolverk's Lair -- http://arthur.corlissfamily.org/ Digital Mages -- http://www.digitalmages.com/ "Live Free or Die, the Only Way to Live" -- NH State Motto