A few times in either perl core, or some modules like syntax modules,
I've found places where I've wanted to add very-optional warnings that
aren't enabled by default, but suggest to the author that "you're doing
something a bit weird here", or maybe "eh; this feature might be
removed in a later version so you want to swap to something else", but
it isn't yet a problem that should warn for end-users.
I'm thinking there ought to be some standard way to enable these
non-default warnings that both perl core and whatever modules can all
follow, to enable these things. I'd then want to enable that when
doing my author testing so I can see these extra things.
It shouldn't require any source changes (so any lexical pragmas etc..
are no good) because I'd want to optionally enable it during auther
testing alone, but I wonder about using an environment variable.
For example, I could
$ PERL_WARN_ME_HARDER=1 ./Build test
t/00use.t ..... Hey you probably shouldn't be doing this weird thing
at Foo.pm line 123.
t/00use.t ..... ok
Before I try to create something new (or just propose the-above), I
wonder: Are there any existing precedents for this kind of thing
already?
--
Paul "LeoNerd" Evans
leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
I've found places where I've wanted to add very-optional warnings that
aren't enabled by default, but suggest to the author that "you're doing
something a bit weird here", or maybe "eh; this feature might be
removed in a later version so you want to swap to something else", but
it isn't yet a problem that should warn for end-users.
I'm thinking there ought to be some standard way to enable these
non-default warnings that both perl core and whatever modules can all
follow, to enable these things. I'd then want to enable that when
doing my author testing so I can see these extra things.
It shouldn't require any source changes (so any lexical pragmas etc..
are no good) because I'd want to optionally enable it during auther
testing alone, but I wonder about using an environment variable.
For example, I could
$ PERL_WARN_ME_HARDER=1 ./Build test
t/00use.t ..... Hey you probably shouldn't be doing this weird thing
at Foo.pm line 123.
t/00use.t ..... ok
Before I try to create something new (or just propose the-above), I
wonder: Are there any existing precedents for this kind of thing
already?
--
Paul "LeoNerd" Evans
leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/