Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^3: Writing a better Modern::Perl

by JavaFan (Canon)
on Oct 07, 2010 at 18:14 UTC ( #864056=note: print w/replies, xml ) Need Help??

in reply to Re^2: Writing a better Modern::Perl
in thread Writing a better Modern::Perl

I have nothing against defaults.

However, if you would be happy with the defaults, you wouldn't toss out one module, and write your own with a different set of defaults.

I know what "defaults" I get when using 'use warnings', or 'use strict'. I also know they are very unlikely to change, and, if they do, it will require a major Perl release. The defaults for 'use strict' haven't changed since 5.000.

But with Modern::Perl, nextgen, and other modules enabling lexical pragmas outside of their lexical scope, they aren't defaults. The are choices, choices made by the authors. And regardless whether one agrees with the authors choices, for each module you encounter in code you inherit/maintain, you'll have to find out what it does. That takes an effort.

Writing good Perl code isn't golfed code. Mentioning the pragmas you're going to use in your program only takes a few seconds of typing. IMO, the benefits of mentioning the pragmas your using far outweight the cost of typing a few lines. It's just like comments. I spend quite a few keystrokes on comments. Sometimes, the comments even look like "boilerplate". Guess what, I don't hide that in a module either.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://864056]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2018-05-20 11:03 GMT
Find Nodes?
    Voting Booth?