I'm by no means an expert, but have used 2 and 3 for various reasons. Shameless self-promotion as example relevant to answer to follow:

I developed Cisco::SNMP and the distribution has several simple example scripts. For a much more comprehensive tool, I have https://github.com/vinsworldcom/crapps, which uses Cisco::SNMP - so in this case, I'm using option 2 - split the module and the "tool on its own".

With the CRAPPS tool on GitHub, it not only does the SNMP stuff (with Cisco::SNMP) but also does Telnet and optionally SSH and other stuff too. So it requires Net::Telnet::Cisco but will run without the optional Net::SSH2::Cisco - you just don't get the option to use SSH. There are other modules which I optionally use so if the user doesn't have them installed, the script still runs and if they request an option that requires a module that is not installed, it produces a nice error telling them they need a module to use that feature. So that is like your option 3.

So a question could be, does your tool run without the graphing modules such that you can make them optional? If they are conditionally used, maybe you don't have to have extra dependencies, but if the user sees your PerlDoc and tries to use the graph, they get a nice error message saying they need to install an additional module, but for users not graphing, it will work without additional dependencies.

VinsWorldcom@C:\Users\VinsWorldcom> crapps --ver Modules, Perl, OS, Program info: C:\usr\bin\crapps.pl Version 3.02 - 09 JUL 2015 strict 1.07 warnings 1.18 Getopt::Long 2.41 Pod::Usage 1.63 Sys::Hostname 1.17 Socket 2.013 Cisco::SNMP 1.01 Net::Ping 2.41 Net::Telnet::Cisco 1.10 Net::SSH2::Cisco [NOT INSTALLED] Crypt::PasswdMD5 [NOT INSTALLED] Term::ReadKey [NOT INSTALLED] Perl version 5.018001 Perl executable C:\strawberry\perl\bin\perl.exe OS MSWin32

In reply to Re: Avoiding extra dependencies in co-developed module and application by VinsWorldcom
in thread Avoiding extra dependencies in co-developed module and application by Dallaylaen

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.