I'd simply put something like the following 
at the top of the .pl file:
if(! -f c:\\path\\file.exe) { die "some msg"; }

If -f isn't sufficient, one or more of the -X 
operators should do the job just fine.


> -----Original Message-----
> From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 25, 2002 11:01 AM
> To: [EMAIL PROTECTED]
> Subject: Re: "Require" an .exe file
> 
> 
> From: Fred <[EMAIL PROTECTED]>
> > I have broken an application into several pieces to make it more
> > manageable.  I use require whatever.pl to load the next piece.  It
> > works fine.  Now I want to compile the application and distribute. 
> > How can I achieve the same functionality as the require eg require
> > whatever.exe? Thanks, Fred
> 
> You can't require() an exe. You'd have to run them via system() or 
> backticks or Win32::Process or ...
> 
> 1.st solution 
> You compile all the stuff into one EXE. Maybe you'll have to tell 
> PerlApp or Perl2exe what files to include
> 
> 2.nd solution
> You compile into an .exe only the main script, copy the other parts 
> alongside the .exe and require them.
> 
> Jenda
> 
> =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
> There is a reason for living. There must be. I've seen it somewhere.
> It's just that in the mess on my table ... and in my brain
> I can't find it.
>                                       --- me
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to