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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Personally I do not usually list core dependencies.

Modules can be removed from core, which will technically break your distribution if you haven't listed them as dependencies. However, for people who have problems installing your distribution, the fix is simple (and quite obvious given the error messages they are likely to see) - they just need to install the dependency first, and then install your distribution.

Besides which, the deprecation cycle for core modules is quite long. If, after releasing Perl 5.20, p5p decide to drop module Foo, then Perl 5.22 (released a whole year after 5.20) will need to include a version of Foo that issues deprecation warnings, and 5.24 (released a year later again) will be the first version without Foo.

So if you pay attention to what modules are being discussed, you'll get maybe 2 years' notice about module removals. Plenty of time to push out an updated release listing an extra dependency. (And if you don't have the tuits to upload a small bugfix update in 2 years, you should probably think about taking on a co-maintainer.)

Even if you pay no attention to what's going on in p5p, you'll start seeing lots of test failures from CPAN smoke testers on the Perl 5.23 development releases many months before the Perl 5.24 release date.

There are some modules that seem unlikely to be removed in the foreseeable future - strict, warnings, constant, overload, Carp, Exporter, Scalar::Util and Test::More for example.

So why don't I list them? Seeing a long list of dependencies can put some people off using a module. Type-Tiny says Dependencies: none, just as a "::Tiny" module should. :-)

However, Type-Tiny does list a "test_requires" dependency on Test::More 0.96 in META.yml. Why? Because I need 0.96 or above. Perl 5.8.1 (the oldest Perl supported by Type-Tiny) ships with Test::More 0.47. The first Perl to ship with Test::More 0.96 in core was Perl 5.13.4. So that's a reason to list particular core modules as dependencies - you need a newer version than what was bundled with some of your supported versions of Perl.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

In reply to Re: Should I list core modules as dependencies? by tobyink
in thread Should I list core modules as dependencies? by vsespb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-23 22:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found