Re: Moose Type Constraints violations to warnings?
[email protected] (Dave Rolsky)
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 13 Jun 2011, Ovid wrote: > I don't want to turn off the type checks. I would just like some of them to be warnings if we're in production. > > I agree completely with the *concept* of the strict type constraints, but > > >  "In theory, theory and practice are the same. >  In practice, we're trying to comb spaghetti." >  Abraham Lincoln, 1912 speech to the Republican Women's De-emancipation Convention > > If a hotel's "short description" must be no longer than 200 characters, > they would much prefer to have the first 200 characters of their hotel's > 250-character description displayed rather than nothing. You can use coercions to do this, can't you? You could even warn inside the coercion. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/