Hello,
I am fairly new to Perl and will probably say naive and incorrect things in this message.

From what i understood, the Toolkit module (that i have just tried yesterday for the first time) enables to replace a long list of "use" lines by

use Toolkit

It is especially nice because it can determine whether some functions are used or not in the code, and "use" them only if this is the case.

This seems really great, but
to use it, you have to write the list of used modules in several "configuration" files that you put in different parts of the $PERL5LIB/Toolkit directory.
This seems to make it slightly complicated to install a module that uses Toolkit on a new computer, as you will have to copy all the "configuration" files in the right place.

Ok, it is not THAT complicated. But it would be nice if it wasn't needed.
Please, tell me if what i said make sense, or if there is something i didn't understand about the Toolkit module.

Two naive ideas : it could be nice if...

1. the Toolkit module could save this list of modules somewhere, carry it around, and install them wherever i will install my module. I don't imagine at all how to do this, though.

2. the Toolkit module could be "switched off" by adding the 'switch off' argument

use Toolikt 'switch off'
which would comment the
# use Toolikt 'switch off'
line, and add the list of used modules and functions underneath.

Thus, the developers of a particular module could use Toolkit during development, and "switch if off" before releasing their module, which would simply replace the "use Toolkit" line by the appropriate lines, for each .pl and .pm file (as they don't all use the same modules and functions).

Or, (2 bis) Toolkit could be distributed with a script that would enable to do this for all source using Toolkit in a directory.

Does this make any sense ? If not, i'll be happy to learn something about how to use Toolkit properly :-)


In reply to ideas to improve the Toolkit module ? by mascip

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.