File::LocalizeNewlines seems promising :) I didn't notice that module before
though :p

> I do however think that Test::File::EOL would be a better name.

Perhaps you misunderstood me, I don't want to write this module, just want
to use it :)


-----Original Message-----
From: Adam Kennedy [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 18, 2008 10:28 AM
To: module-authors@perl.org; Jonas Brømsø Nielsen
Cc: Burak Gürsoy; module-authors@perl.org
Subject: Re: Is there a test module to check eol() in dist files?

Jonas Brømsø Nielsen wrote:
> Hi Burak,
> 
> Is there a general module to do this to begin with?
> 
> Then making a Test::* wrapper is trivial
> 
> I do however think that Test::File::EOL would be a better name.
> 
> 
> jonasbn
> 
> On 11/01/2008, at 23.42, Burak Gürsoy wrote:
> 
>> I think that something like this can be useful when packing distros. I
>> end-up with mixed eol (not in the same file) most of the time:
>>
>> use Test::EOL;
>> eol('lib/Foo/Bar.pm', 'LF');
>> eol('lib/Foo/Bar.pm', 'Unix');
>> eol_is_mixed('lib/Foo/Bar.pm');
>> eol_is_mixed('lib/Foo/Bar.pm', [qw/ LF CRLF /]);
>> eol_isnt_mixed('lib/Foo/Bar.pm');
>> all_eol('Unix');
>> all_eol_isnt_mixed();
>> # etc.
>>
>> (in case I missed it) is there a module to run this kind of tests?

Rather than solve this via testing (for the "dist files" case) I just 
run (or rather, my release script runs) File::LocalizeNewlines over the 
dist directory before packaging.

Adam K


Reply via email to