| 1 | package Net::Social::Mapper::Persona::Email; | ||
| 2 | |||
| 3 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use base qw(Net::Social::Mapper::Persona); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 3 | ▶ | use Email::Address; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | Net::Social::Mapper::Persona::Email - the persona for an email address | ||
| 10 | |||
| 11 | =head2 SYNOPSIS | ||
| 12 | |||
| 13 | See C<Net::Social::Mapper> | ||
| 14 | |||
| 15 | =cut | ||
| 16 | 1 | ▶ | sub _init { |
|
Subroutine
_init: called CC=1 SCAR=0.0
| |||
| 17 | 1 | my $self = shift; | |
| 18 | 1 | $self->{service} = 'email'; | |
| 19 | 1 | $self->{name} = 'Email'; | |
| 20 | 1 | my ($address) = Email::Address->parse($self->{user}); | |
| 21 | 1 | $self->{full_name} = $address->name; # might as well try | |
| 22 | 1 | $self->{domain} = $address->host; | |
| 23 | 1 | $self->{id} = $address->user; | |
| 24 | 1 | $self->{user} = $address->address; | |
| 25 | 1 | return $self; | |
| 26 | } | ||
| 27 | |||
| 28 | =head2 persona_name | ||
| 29 | |||
| 30 | The short canonical name for this persona | ||
| 31 | |||
| 32 | =cut | ||
| 33 | 0 | ▶ | sub persona_name { shift->_do('user', @_) } |
|
Subroutine
persona_name: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 34 | 3 | 1; | |