#!perl -wl
use strict;
use Mac::Glue ':all';

my $address = new Mac::Glue 'Address Book';

# get the first AIM handle of the first Chris
print $address->prop(
	value      => aim_handle => 1,
	person     => 1,
	people     => whose(first_name => equals => "Chris")
)->get;

# get everyone
my @people = $address->prop('people')->get;

# get their AIM handles
for my $person (@people) {
	my $aim = $person->prop(value => aim_handle => 1)->get;
	if ($aim) {
		printf "%s: %s\n", $person->prop('name')->get, $aim;
	}
}

__END__
