diff --git a/bin/netdisco-do b/bin/netdisco-do index 097ea511..a82e3ff6 100755 --- a/bin/netdisco-do +++ b/bin/netdisco-do @@ -125,7 +125,7 @@ foreach my $host (@hostlist) { my $actiontext = ( ($job->device ? ('['.$job->device->ip.']') : '') . - ($job->action eq 'show' ? ('/'.$job->subaction) : '') + ($job->action eq 'show' ? ('/'. ($job->subaction || 'interfaces')) : '') ); # do job diff --git a/lib/App/Netdisco/Worker/Plugin/Contact.pm b/lib/App/Netdisco/Worker/Plugin/Contact.pm index 0590fd6a..cc82e204 100644 --- a/lib/App/Netdisco/Worker/Plugin/Contact.pm +++ b/lib/App/Netdisco/Worker/Plugin/Contact.pm @@ -8,7 +8,7 @@ use App::Netdisco::Transport::SNMP; register_worker({ stage => 'check' }, sub { return Status->error('Missing device (-d).') - unless defined (shift)->device; + unless defined shift->device; return Status->done('Contact is able to run'); }); diff --git a/lib/App/Netdisco/Worker/Plugin/Delete.pm b/lib/App/Netdisco/Worker/Plugin/Delete.pm index 49e32bdc..3aa2c980 100644 --- a/lib/App/Netdisco/Worker/Plugin/Delete.pm +++ b/lib/App/Netdisco/Worker/Plugin/Delete.pm @@ -8,7 +8,7 @@ use App::Netdisco::Util::Device 'delete_device'; register_worker({ stage => 'check' }, sub { return Status->error('Missing device (-d).') - unless defined (shift)->device; + unless defined shift->device; return Status->done('Delete is able to run'); }); diff --git a/lib/App/Netdisco/Worker/Plugin/ExpireNodes.pm b/lib/App/Netdisco/Worker/Plugin/ExpireNodes.pm index 02ae1025..d964aa62 100644 --- a/lib/App/Netdisco/Worker/Plugin/ExpireNodes.pm +++ b/lib/App/Netdisco/Worker/Plugin/ExpireNodes.pm @@ -8,7 +8,7 @@ use Dancer::Plugin::DBIC 'schema'; register_worker({ stage => 'check' }, sub { return Status->error('Missing device (-d).') - unless defined (shift)->device; + unless defined shift->device; return Status->done('ExpireNodes is able to run'); }); diff --git a/lib/App/Netdisco/Worker/Plugin/Location.pm b/lib/App/Netdisco/Worker/Plugin/Location.pm index 0e4acdcf..c7c7f45a 100644 --- a/lib/App/Netdisco/Worker/Plugin/Location.pm +++ b/lib/App/Netdisco/Worker/Plugin/Location.pm @@ -8,7 +8,7 @@ use App::Netdisco::Transport::SNMP; register_worker({ stage => 'check' }, sub { return Status->error('Missing device (-d).') - unless defined (shift)->device; + unless defined shift->device; return Status->done('Location is able to run'); }); diff --git a/lib/App/Netdisco/Worker/Plugin/Renumber.pm b/lib/App/Netdisco/Worker/Plugin/Renumber.pm index 2c4a7a02..3dad0a8d 100644 --- a/lib/App/Netdisco/Worker/Plugin/Renumber.pm +++ b/lib/App/Netdisco/Worker/Plugin/Renumber.pm @@ -9,7 +9,7 @@ use App::Netdisco::Util::Device qw/get_device renumber_device/; register_worker({ stage => 'check' }, sub { return Status->error('Missing device (-d).') - unless defined (shift)->device; + unless defined shift->device; my $new_ip = NetAddr::IP->new($job->extra); unless ($new_ip and $new_ip->addr ne '0.0.0.0') { diff --git a/lib/App/Netdisco/Worker/Plugin/Show.pm b/lib/App/Netdisco/Worker/Plugin/Show.pm index d6e55347..3ad2d942 100644 --- a/lib/App/Netdisco/Worker/Plugin/Show.pm +++ b/lib/App/Netdisco/Worker/Plugin/Show.pm @@ -9,7 +9,7 @@ use App::Netdisco::Transport::SNMP; register_worker({ stage => 'check' }, sub { return Status->error('Missing device (-d).') - unless defined (shift)->device; + unless defined shift->device; return Status->done('Show is able to run'); }); diff --git a/lib/App/Netdisco/Worker/Status.pm b/lib/App/Netdisco/Worker/Status.pm index 5d757d37..6bfef35d 100644 --- a/lib/App/Netdisco/Worker/Status.pm +++ b/lib/App/Netdisco/Worker/Status.pm @@ -59,9 +59,9 @@ sub _make_new { return $new; } -sub error { (shift)->_make_new('error', @_) } -sub done { (shift)->_make_new('done', @_) } -sub defer { (shift)->_make_new('defer', @_) } +sub error { shift->_make_new('error', @_) } +sub done { shift->_make_new('done', @_) } +sub defer { shift->_make_new('defer', @_) } =head2 noop