I want to put in a script a test to find out if it is run as a droplet or executed from within MacPerl.
All I get with 'caller' is undef.
Is there a (better) way ?
For droplets the creator is "MrPL" and the Type is "APPL".
#!perl
use Mac::Files; use Mac::StandardFile;
$file = StandardGetFile(0, 0); $f = $file->sfFile() if ($file->sfGood());
($creator, $type) = &MacPerl::GetFileInfo($f); print "$f\nCreator = $creator\n Type = $type\n";
__END__
David Seay http://www.mastercall.com/g-s/