Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <001a01c1a396$028cfa60$070da8c0@pucki> From: =?iso-8859-1?Q?J=F6rg_Schaible?= To: Subject: perl & textmode mounts Date: Tue, 22 Jan 2002 23:41:55 +0100 Organization: JSI MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g0MMf5131848 Hi Perl porters, there seems still an issue concerning textmode mounts and perl. I already found http://www.cygwin.com/ml/cygwin/2001-08/msg00981.html and http://www.cygwin.com/ml/cygwin/2001-03/msg01345.html 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/Parser.pm:1173 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/Parser.pm:1060 A textline is read using the expression "<$in_fh>". $textline value has an appended "\cM\cJ" 3) cygwin-multi/Pod/Select.pm:508 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 Parser.pm 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 ? Regards, Jörg -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/