Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Should Test::Most import strict and warnings?

by bellaire (Hermit)
on Feb 05, 2010 at 13:53 UTC ( [id://821558]=note: print w/replies, xml ) Need Help??


in reply to Should Test::Most import strict and warnings?

Is there precedent for this? It does seem a little odd that a module would enable pragmas in its calling scope when they aren't strictly necessary (no pun intended). I can appreciate that it reduces boilerplate, but there's nothing about the stated purpose of Test::Most that makes it obvious that you'd be doing this by default. Most of us are used to having to turn on strict and warnings in our own code. I think your module's user population would break down like this:
  • (Hopefully) most people are already using strict and warnings in calling scope, so this change is transparent but provides no tangible benefit.
  • Some people are not using strict and warnings in calling scope, so this change breaks their code and they add no pragmas to get their code to work again, again no benefit.
  • A small number of people already using strict and warnings read about this change and are able to reduce their boilerplate code by two lines, for the benefit stated.
  • An even smaller number of people (perhaps zero) have their code break and they decide to make it strict- and warnings-compliant. I guess this is a benefit, but it's not your stated intention.

Replies are listed 'Best First'.
Re^2: Should Test::Most import strict and warnings?
by moritz (Cardinal) on Feb 05, 2010 at 14:36 UTC
    Is there precedent for this?

    iirc Moose enables strict in the caller's scope.

    Still I'm not in favour of entagling policy and implementation.

    Perl 6 - links to (nearly) everything that is Perl 6.
        I don't think those examples count.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://821558]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-23 09:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found