Mac::AppleEvents, Now With Special Sauce

pudge on 2002-12-06T04:32:16

One of the porting problems I ran into was that vAEBuild and friends now have an optional second parameter (put in between the first and formerly second parameter) for syntax errors in the format string. I've decided (for now) to plop that extra information into $@. This sort of thing can really come in handy when trying to write those AEGizmos strings.

use Mac::AppleEvents; use Mac::Errors; $e = AEBuildAppleEvent(qw(aevt odoc sign MACS), -1, 0, "asdasd"); print "$Mac::Errors::MacError: $@" if $!; __END__

AEBuildDesc and friends detected a syntax error: Missing ":" after keyword in record at character 6


And:

use Mac::AppleEvents; use Mac::Errors; $e = AEBuildAppleEvent(qw(aevt odoc sign MACS), -1, 0, q"'----':obj { want:type(cobj), from:null(), form:enum(name), seld:TEXT(@)", "Orr:" ); print "$Mac::Errors::MacError: $@" if $!; __END__

AEBuildDesc and friends detected a syntax error: Expected "," or "}" at character 72

Now Playing: I'm Forgettable - Brak (Brak Presents The Brak Album)