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-02 15:21:01 +01:00

19 lines
No EOL
334 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->resultset('ExternalReference')->find_or_create({ name => $self->external_name });
}
);
1;