[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Getting 'Run Time' Version of Mac Toolbox included Code toexecute.



Above my 'Main' Code Area I include:
use Mac::Files;

In my 'Main' Code Area I include:
&Change_File_Type

Below my 'Main' Code Area - in the 'SubRoutin' Code Area I include:
sub Change_File_Type {
 my($file) = @_;

 my($file_Cat, $file_Info);

 $file_Cat = FSpGetCatInfo($file);
 $file_Info = $file_Cat->ioFlFndrInfo();

 $file_Info->fdCreator('SITx');
 $file_Info->fdType('SIT!');
 $file_Cat->ioFlFndrInfo($file_Info);
 FSpSetCatInfo($file, $file_Cat);
}

With 'MacPerl CFM68K' the above Source Code is saved with '.pl' appended to
the FileName; and, the Code executes as expected.

The Code is then saved as a 'Run Time', with '.rt' appended to the FileName.
When I double-click on the '.rt' File I am notified with this:

# Can't locate Mac/Files.pm in @INC.
File 'HDD_03:....:theFile.rt'; Line 14
# BEGIN failed--compilation aborted.
File 'HDD_03:....:theFile.rt'; Line 14

... where Line 14 contains 'use Mac::Files;'.


Am I doing something wrong?, is it not possible to 'compile' a 'Run Time'
Version that I can use on another Volume?


Any 'MacPerl' Code that I have previously written - not requiring 'use
Mac::...;' can be saved as a 'Run Time' Version ['.rt'], placed on other
Volumes, and executes as expected.

-----

System Info:
Model: Mac IIci - 98 MB RAM
MacOS: 7.6.1

-----

Samuel



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org