Good morning,
I am using Mac::Glue to get alias style strings from a FileMaker database. I
need to convert the string into a posix style path for manipulation in perl.
I realize that Mac::Glue will convert an alias to posix path when doing a
'get'. But how do I convert the string into an alias?
I'm trying to do the equivalent of the following AppleScript:
set file_path to "HD:Users:charlie:test_file"
set file_str to (POSIX path of file_path) as string
-- returns "/Users/charlie/test_file"
This is the perl version I'm trying:
use Mac::Glue ':glue';
my $app = new Mac::Glue 'System_Events';
my $file_path = "HD:Users:charlie:test_file";
my $file_str = $app->get($file_path, as => 'posix_path');
#my $file_str = $app->obj($file_path, as => 'posix_path');
#my $file_str = $app->get($file_path, as => 'posix_file');
#my $file_str = $app->get($file_path, as => 'alias');
print "$file_str\n"; # want "/Users/charlie/test_file"
I have tried different variations, and none of them are working. Maybe I'm
approaching the problem the wrong way.
Can anyone suggest how to convert an alias string into a posix path string?
Thanks,
Charlie
--
Charlie Garrison [EMAIL PROTECTED]
PO Box 141, Windsor, NSW 2756, Australia