NAME

XML::FOAF::Emailaddress - OOP for handling FOAF email addresses.


SYNOPSIS

 # Note the single quotes
 my $email = XML::FOAF::Emailaddress->new('foo@bar.com');
 print "My email address SHA-ed is $email\n";


DESCRIPTION

This is little more than an OOP-ifying of existing code that's already been written for generating SHA1 hashes for email addresses.

I wrote it because I am punch drunk on using the Perl overload hooks -- which in this case overloads the '' operator to return the garbled email address -- and because I can never remember how to actually handle email addresses in FOAF.

Presumably, I can now safely forget altogether.


PACKAGE METHODS

__PACKAGE__->new($emailaddress)

If no address id defined, defaults to someone@example.com


OBJECT METHODS

$obj->sha1()

Returns a SHA1 hash for the object's email address.

$obj->address()

Returns the object's email address.


VERSION

1.0


DATE

$Date: 2003/04/08 13:52:36 $


AUTHOR

Aaron Straup Cope


SEE ALSO

http://www.w3.org/2001/sw/Europe/200303/geo/PerlSha1.pl

http://london.pm.org/~jo/foaf.pl.txt

the Digest::SHA1 manpage


LICENSE

Copyright (c) 2003, Aaron Straup Cope. All Rights Reserved.

This is free software, you may use it and distribute it under the same terms as Perl itself.