In progress commit
This commit is contained in:
parent
1d22da2bed
commit
bea1301475
19 changed files with 478 additions and 79 deletions
19
lib/Pear/LocalLoop/Import/Role/ExternalName.pm
Normal file
19
lib/Pear/LocalLoop/Import/Role/ExternalName.pm
Normal file
|
@ -0,0 +1,19 @@
|
|||
package Pear::LocalLoop::Import::Role::ExternalName;
|
||||
use strict;
|
||||
use warnings;
|
||||
use Moo::Role;
|
||||
|
||||
requires qw/
|
||||
external_name
|
||||
schema
|
||||
/;
|
||||
|
||||
has external_result => (
|
||||
is => 'lazy',
|
||||
builder => sub {
|
||||
my $self = shift;
|
||||
return $self->resultset('ExternalReference')->find_or_create({ name => $self->external_name });
|
||||
}
|
||||
);
|
||||
|
||||
1;
|
Reference in a new issue