Hi Chris,
This is all working great. I just realized, though, that my initial email search isn't working - to find a person with the email $foo, I've tried:
$person = $glue->obj(people => whose(email => equals => $foo));
Obviously this can't work, because email is an element, not a property. Is there a way to do this in a single query, or do I need to iterate through some result list?
-Ken
On Jul 14, 2004, at 3:54 PM, Chris Nandor wrote:
Properties are simple enough. You get like this:
$person->prop('last_name')->get;
And similarly, set like this:
$person->prop('last_name')->set(to => 'Baz');
In the case of the email elements, emails property returns a list, and each
element of the list is an email object, which you can then get and set with
the value property.
for my $email ($person->prop('emails')->get) { print $email->prop('value')->get; }
To set:
for my $email ($person->prop('emails')->get) { my $value = $email->prop('value'); (my $text = $value->get) =~ s/\@/[EMAIL PROTECTED]/; print $value->set(to => $text); }