Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^6: Writing a better Modern::Perl

by EvanCarroll (Chaplain)
on Oct 07, 2010 at 18:37 UTC ( [id://864065]=note: print w/replies, xml ) Need Help??


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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^7: Writing a better Modern::Perl
by JavaFan (Canon) on Oct 07, 2010 at 20:07 UTC
    What is "diverse code"?
    Well, it seems the fast majority of the code you write are OO modules (99% you said). I write OO classes. I write procedural modules. Small ones. Large ones. I also write applications. Throw away applications. Applications that will be reused. Mason pages. Code that's run from modperl. Code that's run from the command line. Code that's run from cron. Code that runs on 5.8.x. Code that runs on 5.12.x.

    Different code has different requirements. Where I may use autodie for a run-once program, I'm less likely to have a need for autodie for a module that sits between a webapp and a database. Whatever you come up with nextgen (or anyone else with a similar module), even if it's ideal for some of the code I write, it cannot be ideal for the majority of the code I write.

    As I said before, the only modules/pragmas that are used in most of my modules are 'use strict; use warnings; use 5.XXX;'. There's nothing else that I use often enough that I want it loaded by default.

      There's nothing else that I use often enough that I want it loaded by default.

      I agree, and that's why I've been reluctant to add anything but autodie to Modern::Perl. My current approach is "it enables features of the core that should be on by default and nothing more".

Re^7: Writing a better Modern::Perl
by JavaFan (Canon) on Oct 07, 2010 at 18:44 UTC
    As I said, I write diverse code. None of the modules you mention, a majority of my code needs it. And it's unlikely I would ever write a file that needs all the modules your nextgen provides (and the more you add, the less likely it will be). But "use"ing modules you don't need have a negative impact: more dependencies, more chance of bugs, longer load times, more memory usage. More reason to just list the modules/pragmas you use instead of using a set of modules someone else finds convenient.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 16:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found