Bad file descriptor error with PerlEx

Bad file descriptor error with PerlEx

am 26.11.2008 11:55:59 von Alceu Rodrigues de Freitas Junior

Greetings,

I'm trying to use a web application with CGI::Application in a PerlEx
environment but I'm receiving the following error:


*** 'C:\dts_ut\dts.plex' log message at: 2008/11/12 18:26:33
Precompiler: Fatal Eval Error:
Package:[PerlEx::Precompiler::c_::dts_ut::dts_plex]
File:[C:\dts_ut\dts.plex]
Error:[Can't dup STDOUT: Bad file descriptor at
C:/Perl/lib/Test/Builder.pm line 1376.
Compilation failed in require at C:/Perl/lib/Test/Builder/Module.pm line 3.
BEGIN failed--compilation aborted at C:/Perl/lib/Test/Builder/Module.pm
line 3.
Compilation failed in require at C:/Perl/lib/Test/More.pm line 22.
BEGIN failed--compilation aborted at C:/Perl/lib/Test/More.pm line 22.
Compilation failed in require at
C:/Perl/site/lib/DTS_UT/Model/UnitTest.pm line 5.
BEGIN failed--compilation aborted at
C:/Perl/site/lib/DTS_UT/Model/UnitTest.pm line 5.
Compilation failed in require at
C:/Perl/site/lib/DTS_UT/Model/UnitTestExec.pm line 19.
BEGIN failed--compilation aborted at
C:/Perl/site/lib/DTS_UT/Model/UnitTestExec.pm line 19.
Compilation failed in require at
C:/Perl/site/lib/DTS_UT/Controller/MainController.pm line 32.
BEGIN failed--compilation aborted at
C:/Perl/site/lib/DTS_UT/Controller/MainController.pm line 32.
Compilation failed in require at C:\dts_ut\dts.plex line 3.
BEGIN failed--compilation aborted at C:\dts_ut\dts.plex line 3.
]


Test::Builder does a trick to enable using diferent outputs from the
tests results to another filehandles and does that by duplicating STDOUT.

My guess is that PerlEx work differently from the expected so the
program fails to compile. Trying to use IO::Select does not help either.

Could you point to any link or documentation where I could find more
details about PerlEx? I tried to get some feedback with the
Test::Builder creator but got no answer until now.

The web application I'm talking about can be downloaded from here:
http://perldts.googlecode.com/files/DTS_UT.zip

Thanks to all,
Alceu
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Bad file descriptor error with PerlEx

am 27.11.2008 19:40:22 von Gaurav Vaidya

Hi Alceu,

I don't know anything about CGI::Application or PerlEx, so apologies
in advance if I miss something obvious.

On Nov 26, 2008, at 6:55 PM, Alceu Rodrigues de Freitas Junior wrote:
>
> *** 'C:\dts_ut\dts.plex' log message at: 2008/11/12 18:26:33
> Precompiler: Fatal Eval Error:
> Package:[PerlEx::Precompiler::c_::dts_ut::dts_plex]
> File:[C:\dts_ut\dts.plex]
> Error:[Can't dup STDOUT: Bad file descriptor at
> C:/Perl/lib/Test/Builder.pm line 1376.
> [..]
> Compilation failed in require at C:\dts_ut\dts.plex line 3.
> BEGIN failed--compilation aborted at C:\dts_ut\dts.plex line 3.
> ]
>

I tried to check what line 1376 on Test::Builder did, but that line on
Perl 5.10 is pretty benign (it's an assignment). Which versions of
Test::Builder and Perl are you using? What is line 1376 of Test/
Builder.pm trying to do? Maybe there's some way you can "fix" it to
work for your program?

> Could you point to any link or documentation where I could find more
> details about PerlEx? I tried to get some feedback with the
> Test::Builder creator but got no answer until now.
I googled "Can't dup STDOUT: Bad file descriptor" and got this, which
looks a lot like your error message:
http://www.nntp.perl.org/group/perl.qa/2006/07/msg6705.html

Not sure if it's helpful, but maybe PerlEx is localizing a filehandle
in a BEGIN somewhere. Or something.

If you haven't already, you should ask your question at PerlMonks:
there's bound to be somebody there who's had this problem before.

cheers,
Gaurav
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs