package CPAN::Index::Author; use strict; use base 'DBIx::Class'; use Email::Address (); use vars qw{$VERSION}; BEGIN { $VERSION = '0.01'; } __PACKAGE__->load_components('Core'); __PACKAGE__->table('author'); __PACKAGE__->add_columns( id => { data_type => 'varchar', size => 16, is_nullable => 0, is_auto_increment => 0, default_value => '', }, name => { data_type => 'varchar', size => 255, is_nullable => 0, is_auto_increment => 0, default_value => '', }, email => { data_type => 'varchar', size => 255, is_nullable => 0, is_auto_increment => 0, default_value => '', }, ); __PACKAGE__->set_primary_key('id'); sub address { Email::Address->new( $_[0]->name => $_[0]->email ); } 1; __END__ =pod =head1 NAME CPAN::Index::Author - An object representing a CPAN author =head1 DESCRIPTION B object represent CPAN authors in the index. =head1 METHODS =head2 id The C accessor returns the author's CPAN id. This is a capitalized string. For example, the author's CPAN id is "ADAMK". =head2 name The C accessor returns the full name of the CPAN author =head2 email The C accessor returns the email address of the CPAN author =head2 address The C
method returns the email address of the CPAN author, but as a full name-inclusive L object. =head1 SUPPORT Bugs should be reported via the CPAN bug tracker L For other issues, contact the author. =head1 AUTHOR Adam Kennedy Ecpan@ali.asE C based on L by Leon Brocard Eacme@cpan.orgE =head1 SEE ALSO L, L =head1 COPYRIGHT Copyright (c) 2006 Adam Kennedy. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. =cut