Files
netdisco/lib/App/Netdisco/Backend/Job.pm
Oliver Gorwits d74ccac4f6 rename *-daemon apps to be *-backend
Squashed commit of the following:

commit 39b438aa4b
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat May 6 16:40:11 2017 +0100

    add release notes

commit ca4ea90d35
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat May 6 16:32:06 2017 +0100

    update distmeta

commit 4e35b904b0
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat May 6 16:30:22 2017 +0100

    rename files from Daemon to Backend

commit 86a605ba68
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat May 6 16:26:43 2017 +0100

    rename daemon to backend in code

commit ffe8fc180f
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat May 6 16:15:57 2017 +0100

    add daemon files which exec to backend equivalents

commit 53e041594e
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat May 6 15:32:49 2017 +0100

    rename netdisco-daemon to netdisco-backend
2017-05-06 16:40:48 +01:00

55 lines
724 B
Perl

package App::Netdisco::Backend::Job;
use Moo;
use namespace::clean;
foreach my $slot (qw/
job
entered
started
finished
device
port
action
subaction
status
username
userip
log
debug
/) {
has $slot => (
is => 'rw',
);
}
=head1 METHODS
=head2 summary
An attempt to make a meaningful statement about the job.
=cut
sub summary {
my $job = shift;
return join ' ',
$job->action,
($job->device || ''),
($job->port || '');
# ($job->subaction ? (q{'}. $job->subaction .q{'}) : '');
}
=head1 ADDITIONAL COLUMNS
=head2 extra
Alias for the C<subaction> column.
=cut
sub extra { (shift)->subaction }
1;