In Windows, there's not many times you find a Unix-EOL'd file, however I've noticed that all the Perl files in Strawberry Perl are definitely Unix.
Are you sure? Although I am very rarely using Perl under Windows and may well be wrong on that, I do not think this is correct.

Just a quick try under Windows:

C:\Users\Laurent>perl -e "print qq{foo\nbar}" > foobar.txt C:\Users\Laurent>type foobar.txt foo bar
Looking at the hexadecimal content of foobar.txt:
66 6F 6F 0D 0A 62 61 72 ; foo..bar
Although I used only "\n" in the script, Perl was clever enough to transform it into a windowish "\r\n" (0D 0A) end of line character combination.

And, as far as I understand, Perl will also be clever enough, when reading a file and if detecting that it is working under Windows, to look for "\r\n" combinations as ends of lines, so that the whole thing is in fact transparent to the user: you are using "\n" for record separators and chomp, but Perl knows that it should be understood as "\r\n" if the OS is Windows.

Trouble may occur when processing a Windows-generated file under Unix or vice-versa, but it you're using consistently the OS, Perl will essentially do what you need under the hood, without you even noticing it. So you may think that the Strawberry Perl generated files are Unix-like, but it is most probably not the case.

I think that you need to understand that to figure out how (and whether) you need special processing for your module under Windows.


In reply to Re^3: CPAN module unit test issues: OS line endings by Laurent_R
in thread CPAN module unit test issues: OS line endings by stevieb

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.