Open opendevnet opened 8 years ago
Rationale: Sometimes logging errors but not failing right away helps? :-)
Or maybe import/export options could make errors more flexibly configurable so that Sub::Attributes
could be bolted onto the functions and methods in existing code for tests. Just how well an application works when method/function separation is implemented this way would be a neat thing to test if was easy to do ;-)
Interesting idea, I hadn't thought about strict / warnings etc. It might be nice to make a feature like this generic, e.g. strict and warnings are pragmas, Carp is a module so what about a use attribute?
sub foo :Use(strict warnings Carp) { ... }
First issue! So let me say thanks for this module!
I'm not sure if the feature in the subject line would be useful or how strictly "enforced" these sorts of errors should be. Arguably fatal is good. In a simple version of these options
:strict
(current behaviour and default) would usecroak
and:lax
would usecarp
.