Edit: It's definitely the use of force_plugins. Without that (i.e., with plugins instead), it will indeed error out if Config::Tiny is not present:

Cannot load test.ini: required support modules are not available. Please install Config::Tiny at config_any.pl line 11.

The problem is on Config::Any.pm:144:

# figure out what plugins we're using my @plugins = $force ? map { eval "require $_;"; $_; } @{ $args->{ force_plugins } +} : $class->plugins;

That map { eval "require $_;" $_ } @... line always returns @{$args->{force_plugins}}, even if one or more modules don't load. I don't know if that is the intended behavior or not (doesn't seem like it, based on my very quick reading of the docs), so it might not hurt to bring it up with the module author(s).

For now, you can work around the issue by guarding it in your own (calling) code:

@plugins = grep { eval "require $_" } @plugins;

... or raising an error if you want:

my @missing = grep { !eval "require $_" } @plugins; die "Missing plugin(s): @missing" if @missing;

Original reply missed the point a bit.

Config::Any::INI is part of the Config::Any distribution: Config::Any, and that does require Config::Tiny, which is specified under suggests in the Makefile.PL. Are you sure you don't have Config/Tiny.pm in your Perl install?


In reply to Re: Config::Any does not complain when Config::Tiny is not installed by rjt
in thread Config::Any does not complain when Config::Tiny is not installed by kaldor

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.