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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |