This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

perl & textmode mounts

Hi Perl porters,

there seems still an issue concerning textmode mounts and perl. I already found and
indicating, that this issue is not solved.

The error occurs in my case using Perl module functionality itself. Basically I want to use pod2usage (see perldoc Pod::Usage), but calling the function with verbose level 0 or 1 produces simply no output (bigger levels use a perldoc task). The POD sections won't be matched, because of a trailing \cM. My perl script itself is in a directory mounted in textmode.

I used the Perl debugger to locate the problems:

1) cygwin-multi/Pod/
The file is opened with 
open( $in_fh, "< $infile");
This line seems to be the problem, since the file is opened binary, because ...

2) cygwin-multi/Pod/
A textline is read using the expression "<$in_fh>". $textline value has an appended "\cM\cJ"

3) cygwin-multi/Pod/
The regular expression will extract in $3 the header of the section with a trailing "\cM", so the selected sections will never match.

According to "perldoc -f binmode" I should be able to set textmode manually using
binmode( $in_fh, ":crlf" );
directly after the open command. I modified accordingly. Unfortunately this had no effect either. I assume the Perl build does not know about running in Windows, so it ignores binmode() totally as documented.

Only if I save my perl script in Unix format (on the textmode mount !!) it works as expected! Unfortunately *this* will scramble the checkin/checkout with CVS :(

Since the Perl sources are quite big - has anybody a clue where to start looking for this bug ?


Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]