This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
Foodloop-Server/lib/Pear/LocalLoop/Import/Role/ExternalName.pm
2019-07-05 15:30:31 +01:00

19 lines
343 B
Perl

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->schema->resultset('ExternalReference')->find_or_create({ name => $self->external_name });
}
);
1;