Hallo Monks,

What I've written tonight in the endeavor to make my project ready for GitHub makes me humbly feel that I reinvented the wheel once again. I know there is Dist::Zilla and what not, but my FlowTime project is bloody alpha and not yet at all ready to pack an installable distribution. I just want to simplify for others who clone my repository the process of making sure all requirements are met to run the program in the first place.

Could you tell me if there is a standard way to go? However, I would consider it weird to introduce new dependencies just to check dependencies. So, I want to get along without if this is possible.

Here, the section of my README file:

Check the dependencies ----------------------- Please run the following script now: script/gather_check_dependencies Someday there will certainly be an automatic installation routine that + would resolve all dependencies as needed. In the meantime, you need +to make sure yourself that all required CPAN modules are installed. Y +ou may want to prefer prebuilt packages to install from your distribu +tion repository (for Ubuntu or Debian e.g. lib-algorithm-dependency-p +erl etc.). The indicated versions I tested work, earlier might do as +well. Please note that I deleted lines of modules used internally in +the following example run: $ script/gather_check_dependencies Algorithm::Dependency::Ordered => OK, 1.110 Algorithm::Dependency::Source::HoA => OK, 1.110 Benchmark => OK, 1.15 Bit::Vector => OK, 7.3 Carp => OK, 1.29 Date::Calc => OK, 6.3 FindBin => OK, 1.51 JSON => OK, 2.61 List::MoreUtils => OK, 0.33 List::Util => OK, 1.27 Mojo::Base => OK, loaded (just version unknown) Mojolicious::Commands => OK, loaded (just version unknown) Moose => OK, 2.1210 Moose::Role => OK, 2.1210 Moose::Util::TypeConstraints => OK, 2.1210 POSIX => OK, 1.32 Scalar::Util => OK, 1.27 Test::More => OK, 0.98 Time::Local => OK, 1.2300

The gather_check_dependencies script:

#!/bin/sh egrep -rh '^[\s;]*(use|require) ' lib script t \ | sed -rne 's/ *(use|require) //; /^[A-Z]/p' \ | sort | uniq | perl -Ilib -ne "$(cat <<'PERL')" BEGIN { %seen = () } chomp; $i++; my ($mod,$name,$version) = /(([^\s;]+)(?: (\d[^\s;]+))?)/; warn("Not parsed: $_\n") && next if !$mod; next if $seen{$mod}++; print $name, " => ", eval(qq{ package TestLoad$i; use $mod (); "OK, ".(\$${name}::VERSION // "loaded (just version unknown)") }) // $@, "\n"; PERL

Any advice welcome, thank you!
--flowdy


In reply to Gather and check dependencies w/o Makefile.PL by flowdy

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.