Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 417511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:35:15+00:00 2026-05-12T18:35:15+00:00

I recently installed a module from CPAN and noticed one of its dependencies was

  • 0

I recently installed a module from CPAN and noticed one of its dependencies was common::sense, a module that offers to enable all the warnings you want, and none that you don’t. From the module’s synopsis:

use common::sense;

# supposed to be the same, with much lower memory usage, as:
#
# use strict qw(vars subs);
# use feature qw(say state switch);
# no warnings;
# use warnings qw(FATAL closed threads internal debugging pack substr malloc
#                 unopened portable prototype inplace io pipe unpack regexp
#                 deprecated exiting glob digit printf utf8 layer
#                 reserved parenthesis taint closure semicolon);
# no warnings qw(exec newline);

Save for undef warnings sometimes being a hassle, I’ve usually found the standard warnings to be good. Is it worth switching to common::sense instead of my normal use strict; use warnings;?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:35:15+00:00Added an answer on May 12, 2026 at 6:35 pm

    While I like the idea of reducing boiler-plate code, I am deeply suspicious of tools like Modern::Perl and common::sense.

    The problem I have with modules like this is that they bundle up a group of behaviors and hide behid glib names with changeable meanings.

    For example, Modern::Perl today consists of enabling some perl 5.10 features and using strict and warnings. But what happens when Perl 5.12 or 5.14 or 5.24 come out with great new goodies, and the community discovers that we need to use the frobnitz pragma everywhere? Will Modern::Perl provide a consistent set of behaviors or will it remain “Modern”. If MP keeps with the times, it will break existing systems that don’t keep lock-step with its compiler requirements. It adds extra compatibility testing to upgrade. At least that’s my reaction to MP. I’ll be the first to admit that chromatic is about 10 times smarter than me and a better programmer as well–but I still disagree with his judgment on this issue.

    common::sense has a name problem, too. Whose idea of common sense is involved? Will it change over time?

    My preference would be for a module that makes it easy for me to create my own set of standard modules, and even create groups of related modules/pragmas for specific tasks (like date time manipulation, database interaction, html parsing, etc).

    I like the idea of Toolkit, but it sucks for several reasons: it uses source filters, and the macro system is overly complex and fragile. I have the utmost respect for Damian Conway, and he produces brilliant code, but sometimes he goes a bit too far (at least for production use, experimentation is good).

    I haven’t lost enough time typing use strict; use warnings; to feel the need to create my own standard import module. If I felt a strong need for automatically loading a set of modules/pragmas, something similar to Toolkit that allows one to create standard feature groups would be ideal:

    use My::Tools qw( standard datetime SQLite );
    

    or

    use My::Tools;
    use My::Tools::DateTime;
    use My::Tools::SQLite;
    

    Toolkit comes very close to my ideal. Its fatal defects are a bummer.

    As for whether the choice of pragmas makes sense, that’s a matter of taste. I’d rather use the occasional no strict 'foo' or no warnings 'bar' in a block where I need the ability to do something that requires it, than disable the checks over my entire file. Plus, IMO, memory consumption is a red herring. YMMV.

    update

    It seems that there are many (how many?) different modules of this type floating around CPAN.

    • There is latest, which is no longer the latest. Demonstrates part of the naming problem.
    • Also, uni::perl which adds enabling unicode part of the mix.
    • ToolSet offers a subset of Toolkit‘s abilities, but without source filters.
    • I’ll include Moose here, since it automatically adds strict and warnings to the calling package.
    • And finally Acme::Very::Modern::Perl

    The proliferation of these modules and the potential for overlapping requirements, adds another issue.

    What happens if you write code like:

    use Moose;
    use common::sense;
    

    What pragmas are enabled with what options?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently installed the Eclipse Metrics Plugin and have exported the data for one
I recently installed jruby on a machine that also has ruby installed on it.
I have MacPorts and CPAN installed and I've only just found out that it's
I've recently installed Apache on my FreeBSD machine. All was working fine; telnet via
Recently, I tried to install perl module Net::Packet and Net::Pcap through cpan but it
I've recently installed phc, the php compiler. I started out installing LAMP from source
Recently installed new wordpress theme. The problem is, there are only following font options
I recently installed Windows 2008 Server to replace a crashed hard drive on a
I recently installed MySQL 5 on Windows 2003 and tried configuring an instance. Everything
We recently installed Team Foundation Server 2008 and we are using it for both

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.