blib/lib/App/Netdisco/DB/ResultSet/DeviceBrowser.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
with_snmp_object
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package App::Netdisco::DB::ResultSet::DeviceBrowser;
2 use base 'App::Netdisco::DB::ResultSet';
3  
4 use strict;
5 use warnings;
6  
7 =head1 ADDITIONAL METHODS
8  
9 =head2 with_snmp_object( $ip )
10  
11 Returns a correlated subquery for the set of C<snmp_object> entry for
12 the walked data row.
13  
14 =cut
15  
16 sub with_snmp_object {
17 my ($rs, $ip) = @_;
18 $ip ||= '255.255.255.255';
19  
20 return $rs->search(undef,{
21 # NOTE: bind param list order is significant
22 join => ['snmp_object'],
23 bind => [$ip],
24 prefetch => 'snmp_object',
25 });
26 }
27  
28 1;