Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
This is so frustrating... I want to get to the bottom of it once and for all.

Basically, the "normal" install procedure of using make maker never works.

Here is a specific example so you can see the errors I get. I started by downloading XML::Twig 3.00 from The readme says:


    perl Makefile.PL
    make test
    make install
So, here goes:
c:\temp\xml-twig-3.00\xml-twig-3.00]perl Makefile.PL Checking if your kit is complete... Looks good Have C:\Program Files\Languages\Perl\lib\ expected C:\PROGRA~ +1\Languages\Perl\lib\ Your perl and your seem to have different ideas about the ar +chitecture they are running on. Perl thinks: [lib] Config says: [MSWin32-x86-multi-thread] This may or may not cause problems. Please check your installation of +perl if you have problems building this extension. Writing Makefile for XML::Twig
First, the PROGRA~1 is an alias for "Program Files". Perl was installed using the alias to avoid spaces in file names. So no problem here, except that it seems to ignore the effort.

Next step is more problematic:

c:\temp\xml-twig-3.00\xml-twig-3.00]make 4NT: Unknown command "make"
OK, so I try "nmake" instead, as is common lore.

It includes the line "cp blib\lib\XML\" in its output, which is disconcerting because "cp" is not a command. But there was no error or warning, so what's up?

Next step: nmake test.


Using C:/TEMP/XML-Twig-3.00/XML-Twig-3.00/blib t\is_field..........'C:\Program' is not recognized as an internal or e +xternal command, operable program or batch file.
It's written to assume (don't you love that word?) that nothing in the filename needs escaping. Which is odd because the standard location for programs has a space in it. Looking carefully, I think this just affects the running of the tests, not the meat of it. So onward...

nmake install fared better, using the PROGRA~1 alias. So using that when I installed Perl seems to have overcome a major hurdle, but it's still not complete.

It reacts favorably to perl -MXML::Twig now, so I suppose this is a success. But it didn't update the ActiveState documentation index. Isn't there a utility program somewhere to force the tree to be re-processed?

so where are we?

The ActiveState installer needs to automatically use the short-name alias. Meanwhile, all programs need to either fetch this "official" name, or properly escape out the name discovered by $^X other other means. Since $^X is documented to not necessarily be useful for this purpose, I wonder where these install scripts are getting their information from, and if that's the root of the problem. Isn't the right way to get the path to the executable to use the Config module? Doing it by other means is why it saw "Program Files\" in some places and "PROGRA~1" in others.

Second, shouldn't there be a portable way to escape out filenames for the current OS? We should use that function! (what is it?) Putting an argument in quotes is probably normal for the rest of the command line (but which kind of quotes?), but how to show the program name itself, when writing a batch file, make file, or other script, is something that needs to be abstracted.


In reply to Installing modules under Windows by John M. Dlugosz

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    Domain Nodelet?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others contemplating the Monastery: (4)
    As of 2024-07-23 21:24 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found

      erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.