I expect that ppm will install anything that's cound in blib/script into whatever is specified by $Config{installsitescript}.

All well and good, but as it never gets added to the path, it will always require manual intervention for anything that uses it, to work.

I'll say this once and forever hold my peace on it, but your whole renaming dlls, sticking them in a "common place", and using --force to install them is fundamentally flawed.

What happens when one of your renamed dlls changes? You have just recreated the whole msvcrt.dll dll-hell scenario over again.

I install two of your packages each has a dependency upon a different version of one or more of your renamed dlls. Whichever order I install them in, one of them gets the wrong thing.

And if I install some other package that uses the same dll, but under its real name, what then? If I use both modules in the same script, then I'm going to be using 2 different versions of the same code...

MS (belatedly) got around to solving the problem when they implemented side-by-side assemblies.

From the point of view of someone who will not have to go through the work of changing everything, and with a less than strong attitude toward properness, I think that you should be either:

  1. shipping these dlls under their real names, with each package that uses them, and place them in the same directory as the dll(s) that use them -- probably site\lib\auto\Package\Name\Name.dll.

    That way, when the day comes that one of your packages needs a later version of one of your renamed-to-sis dlls, its installation won't break every previous one still using the older version. And even if one script uses two packages that each depend upon a different versions, everything will still work because of the side-by-side feature.

  2. At a stretch, if the multiple copies of the same thing issue really offends you, then create a separate package -- say MinGW::Redist -- and make it a dependency of all the other packages. It would need a perl component that caused the dlls to be loaded (from its site\lib\auto\MinGW\Redist\ path), but that could be as simple as:
    package MinGW::Redist; use Win32; Win32::LoadLibrary( 'libgcc_s_dw2_1.dll' ) or die $^E; Win32::LoadLibrary( 'libstdc++-6.dll' ) or die $^E; ... 1;

The latter would avoid the need for --force, but would not resolve the problem of different packages needing different versions.

Overall, the former is both the simplest and best solution.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong


In reply to Re^6: Module::Install hacking by BrowserUk
in thread Module::Install hacking by syphilis

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.