projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
autoload methods returning foreign records, RT#13971
[freeside.git]
/
FS
/
FS
/
addr_block.pm
diff --git
a/FS/FS/addr_block.pm
b/FS/FS/addr_block.pm
index
778c124
..
8dd09ab
100755
(executable)
--- a/
FS/FS/addr_block.pm
+++ b/
FS/FS/addr_block.pm
@@
-1,18
+1,14
@@
package FS::addr_block;
package FS::addr_block;
+use base qw(FS::Record);
use strict;
use strict;
-use vars qw( @ISA );
-use FS::Record qw( qsearchs qsearch dbh );
-use FS::router;
-use FS::addr_range;
-use FS::svc_broadband;
-use FS::Conf;
-use FS::IP_Mixin;
-use NetAddr::IP;
use Carp qw( carp );
use List::Util qw( first );
use Carp qw( carp );
use List::Util qw( first );
-
-@ISA = qw( FS::Record );
+use NetAddr::IP;
+use FS::Conf;
+use FS::Record qw( qsearch dbh ); #qsearchs
+use FS::IP_Mixin;
+use FS::addr_range;
=head1 NAME
=head1 NAME
@@
-184,25
+180,11
@@
sub check {
Returns the FS::router object corresponding to this object. If the
block is unassigned, returns undef.
Returns the FS::router object corresponding to this object. If the
block is unassigned, returns undef.
-=cut
-
-sub router {
- my $self = shift;
- return qsearchs('router', { routernum => $self->routernum });
-}
-
=item svc_broadband
Returns a list of FS::svc_broadband objects associated
with this object.
=item svc_broadband
Returns a list of FS::svc_broadband objects associated
with this object.
-=cut
-
-sub svc_broadband {
- my $self = shift;
- return qsearch('svc_broadband', { blocknum => $self->blocknum });
-}
-
=item NetAddr
Returns a NetAddr::IP object for this block's address and netmask.
=item NetAddr
Returns a NetAddr::IP object for this block's address and netmask.
@@
-393,12
+375,6
@@
To be implemented.
Returns the agent (see L<FS::agent>) for this address block, if one exists.
Returns the agent (see L<FS::agent>) for this address block, if one exists.
-=cut
-
-sub agent {
- qsearchs('agent', { 'agentnum' => shift->agentnum } );
-}
-
=item label
Returns text including the router name, gateway ip, and netmask for this
=item label
Returns text including the router name, gateway ip, and netmask for this